Skip to content

Commit

Permalink
bump discordsrv
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed Sep 24, 2022
1 parent 074e097 commit d700fda
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.mineinabyss.idofront.messaging.miniMsg
import github.scarsz.discordsrv.Debug
import github.scarsz.discordsrv.DiscordSRV
import github.scarsz.discordsrv.dependencies.jda.api.Permission
import github.scarsz.discordsrv.dependencies.jda.api.entities.MessageEmbed
import github.scarsz.discordsrv.util.DiscordUtil
import github.scarsz.discordsrv.util.MessageUtil
import github.scarsz.discordsrv.util.PlaceholderUtil
Expand Down Expand Up @@ -41,8 +42,7 @@ class ChattyProxyListener : PluginMessageListener {
onlinePlayers.forEach {
//it.sendMessage(decoded.miniMsg())
}
}
else {
} else {
if (channel.logToConsole)
Bukkit.getConsoleSender().sendMessage(proxyMessage.miniMsg())

Expand All @@ -56,7 +56,8 @@ class ChattyProxyListener : PluginMessageListener {


if (!chattyConfig.proxy.sendProxyMessagesToDiscord ||
channel?.discordsrv != true || !ChattyContext.isDiscordSRVLoaded) return
channel?.discordsrv != true || !ChattyContext.isDiscordSRVLoaded
) return

val dsrv = DiscordSRV.getPlugin()
var discordMessage = proxyMessage.replaceFirst(channelFormat, "")
Expand Down Expand Up @@ -88,7 +89,7 @@ class ChattyProxyListener : PluginMessageListener {
whUsername,
DiscordSRV.getAvatarUrl(senderName, senderName.toPlayer()?.uniqueId),
discordMessage.translateEmoteIDsToComponent(),
null
MessageEmbed(null, null, null, null, null, 10, null, null, null, null, null, null, null)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class DiscordListener {

@Subscribe(priority = ListenerPriority.HIGHEST)
fun DiscordGuildMessagePostProcessEvent.sendDiscordToProxy() {
minecraftMessage = (minecraftMessage.serialize().substringBefore(message.contentRaw) + mm.stripTokens(message.contentStripped)).miniMessage()
minecraftMessage = (minecraftMessage.serialize().substringBefore(message.contentRaw) + mm.stripTags(message.contentStripped)).miniMessage()
Bukkit.getServer().sendPluginMessage(chatty, chattyProxyChannel, minecraftMessage.serialize().toByteArray())
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/chattyLibs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ geary = "0.20.114"
guiy = "0.7.24"
bondrewdlikeshisemotes = "1.1.3"
velocity = "3.1.1"
discordsrv = "1.25.1"
discordsrv = "1.26.0"

[libraries]
geary-papermc-core = { module = "com.mineinabyss:geary-papermc-core", version.ref = "geary" }
Expand Down

0 comments on commit d700fda

Please sign in to comment.