diff --git a/src/main/kotlin/de/limited_dev/botendo/Bot.kt b/src/main/kotlin/de/limited_dev/botendo/Bot.kt index daaa19b..a9bc9cd 100644 --- a/src/main/kotlin/de/limited_dev/botendo/Bot.kt +++ b/src/main/kotlin/de/limited_dev/botendo/Bot.kt @@ -60,7 +60,7 @@ object Bot { //Register Command Listener kord.on { - val deferred = interaction.deferPublicResponse() + val deferred = interaction.deferEphemeralResponse() //val deferred = async { interaction.deferPublicResponse() } val command = interaction.command Logger.out("Command /${command.rootName} with ${command.options.size} Option${if (command.options.size == 1) "" else "s"}") diff --git a/src/main/kotlin/de/limited_dev/botendo/commands/slash/component/SlashCommand.kt b/src/main/kotlin/de/limited_dev/botendo/commands/slash/component/SlashCommand.kt index a0367a1..a3bba9a 100644 --- a/src/main/kotlin/de/limited_dev/botendo/commands/slash/component/SlashCommand.kt +++ b/src/main/kotlin/de/limited_dev/botendo/commands/slash/component/SlashCommand.kt @@ -20,14 +20,14 @@ package de.limited_dev.botendo.commands.slash.component import de.limited_dev.botendo.commands.slash.component.options.CommandOption -import dev.kord.core.behavior.interaction.response.DeferredPublicMessageInteractionResponseBehavior +import dev.kord.core.behavior.interaction.response.DeferredEphemeralMessageInteractionResponseBehavior import dev.kord.core.entity.interaction.GuildChatInputCommandInteraction abstract class SlashCommand(val name: String, val description: String, val options: List? = null) { open suspend fun onSlashCommand( interaction: GuildChatInputCommandInteraction, - deferred: DeferredPublicMessageInteractionResponseBehavior, + deferred: DeferredEphemeralMessageInteractionResponseBehavior, args: Map ) { } diff --git a/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/NowPlayingCommand.kt b/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/NowPlayingCommand.kt index 36e830e..c00369c 100644 --- a/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/NowPlayingCommand.kt +++ b/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/NowPlayingCommand.kt @@ -25,14 +25,14 @@ import de.limited_dev.botendo.commands.slash.component.options.CommandOption import de.limited_dev.botendo.util.MessageUtil import de.limited_dev.botendo.util.TimeUtil import de.limited_dev.botendo.util.UrlUtil -import dev.kord.core.behavior.interaction.response.DeferredPublicMessageInteractionResponseBehavior +import dev.kord.core.behavior.interaction.response.DeferredEphemeralMessageInteractionResponseBehavior import dev.kord.core.entity.interaction.GuildChatInputCommandInteraction import dev.schlaubi.lavakord.audio.Link class NowPlayingCommand : SlashCommand("nowplaying", "Show what's currently playing", null) { override suspend fun onSlashCommand( interaction: GuildChatInputCommandInteraction, - deferred: DeferredPublicMessageInteractionResponseBehavior, + deferred: DeferredEphemeralMessageInteractionResponseBehavior, args: Map ) { val guildId = interaction.guildId diff --git a/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/PlayCommand.kt b/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/PlayCommand.kt index cc48ceb..3cde4ff 100644 --- a/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/PlayCommand.kt +++ b/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/PlayCommand.kt @@ -25,7 +25,7 @@ import de.limited_dev.botendo.commands.slash.component.options.CommandOption import de.limited_dev.botendo.commands.slash.component.options.OptionType import de.limited_dev.botendo.commands.slash.music.component.MusicManager import de.limited_dev.botendo.util.MessageUtil -import dev.kord.core.behavior.interaction.response.DeferredPublicMessageInteractionResponseBehavior +import dev.kord.core.behavior.interaction.response.DeferredEphemeralMessageInteractionResponseBehavior import dev.kord.core.entity.interaction.GuildChatInputCommandInteraction import dev.schlaubi.lavakord.audio.Link @@ -36,7 +36,7 @@ class PlayCommand : SlashCommand( ) { override suspend fun onSlashCommand( interaction: GuildChatInputCommandInteraction, - deferred: DeferredPublicMessageInteractionResponseBehavior, + deferred: DeferredEphemeralMessageInteractionResponseBehavior, args: Map ) { val guildId = interaction.guildId diff --git a/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/QueueCommand.kt b/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/QueueCommand.kt index e5f0404..3963fe5 100644 --- a/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/QueueCommand.kt +++ b/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/QueueCommand.kt @@ -25,14 +25,14 @@ import de.limited_dev.botendo.commands.slash.component.options.CommandOption import de.limited_dev.botendo.commands.slash.music.component.MusicManager import de.limited_dev.botendo.util.MessageUtil import de.limited_dev.botendo.util.TimeUtil -import dev.kord.core.behavior.interaction.response.DeferredPublicMessageInteractionResponseBehavior +import dev.kord.core.behavior.interaction.response.DeferredEphemeralMessageInteractionResponseBehavior import dev.kord.core.entity.interaction.GuildChatInputCommandInteraction import dev.schlaubi.lavakord.audio.Link class QueueCommand : SlashCommand("queue", "Show whats up next", null) { override suspend fun onSlashCommand( interaction: GuildChatInputCommandInteraction, - deferred: DeferredPublicMessageInteractionResponseBehavior, + deferred: DeferredEphemeralMessageInteractionResponseBehavior, args: Map ) { val guildId = interaction.guildId diff --git a/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/SkipCommand.kt b/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/SkipCommand.kt index f74a2fd..e63fb2e 100644 --- a/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/SkipCommand.kt +++ b/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/SkipCommand.kt @@ -26,14 +26,14 @@ import de.limited_dev.botendo.commands.slash.music.component.MusicManager import de.limited_dev.botendo.util.MessageUtil import de.limited_dev.botendo.util.TimeUtil import de.limited_dev.botendo.util.UrlUtil -import dev.kord.core.behavior.interaction.response.DeferredPublicMessageInteractionResponseBehavior +import dev.kord.core.behavior.interaction.response.DeferredEphemeralMessageInteractionResponseBehavior import dev.kord.core.entity.interaction.GuildChatInputCommandInteraction import dev.schlaubi.lavakord.audio.Link class SkipCommand : SlashCommand("skip", "Skip to the next song in queue", null) { override suspend fun onSlashCommand( interaction: GuildChatInputCommandInteraction, - deferred: DeferredPublicMessageInteractionResponseBehavior, + deferred: DeferredEphemeralMessageInteractionResponseBehavior, args: Map ) { val guildId = interaction.guildId diff --git a/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/StopCommand.kt b/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/StopCommand.kt index cd46ffb..c060813 100644 --- a/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/StopCommand.kt +++ b/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/StopCommand.kt @@ -24,14 +24,14 @@ import de.limited_dev.botendo.commands.slash.component.SlashCommand import de.limited_dev.botendo.commands.slash.component.options.CommandOption import de.limited_dev.botendo.commands.slash.music.component.MusicManager import de.limited_dev.botendo.util.MessageUtil -import dev.kord.core.behavior.interaction.response.DeferredPublicMessageInteractionResponseBehavior +import dev.kord.core.behavior.interaction.response.DeferredEphemeralMessageInteractionResponseBehavior import dev.kord.core.entity.interaction.GuildChatInputCommandInteraction import dev.schlaubi.lavakord.audio.Link class StopCommand : SlashCommand("stop", "Stop playing and start leavin'", null) { override suspend fun onSlashCommand( interaction: GuildChatInputCommandInteraction, - deferred: DeferredPublicMessageInteractionResponseBehavior, + deferred: DeferredEphemeralMessageInteractionResponseBehavior, args: Map ) { val guildId = interaction.guildId diff --git a/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/component/MusicManager.kt b/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/component/MusicManager.kt index e916542..616e2ee 100644 --- a/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/component/MusicManager.kt +++ b/src/main/kotlin/de/limited_dev/botendo/commands/slash/music/component/MusicManager.kt @@ -23,7 +23,7 @@ import de.limited_dev.botendo.util.MessageUtil import de.limited_dev.botendo.util.TimeUtil import de.limited_dev.botendo.util.UrlUtil import dev.kord.common.entity.Snowflake -import dev.kord.core.behavior.interaction.response.DeferredPublicMessageInteractionResponseBehavior +import dev.kord.core.behavior.interaction.response.DeferredEphemeralMessageInteractionResponseBehavior import dev.kord.core.entity.Guild import dev.kord.core.entity.interaction.GuildChatInputCommandInteraction import dev.schlaubi.lavakord.audio.Link @@ -43,7 +43,7 @@ object MusicManager { suspend fun addToQueue( interaction: GuildChatInputCommandInteraction, - deferred: DeferredPublicMessageInteractionResponseBehavior, + deferred: DeferredEphemeralMessageInteractionResponseBehavior, link: Link, search: String ) { @@ -52,7 +52,7 @@ object MusicManager { suspend fun addToQueue( interaction: GuildChatInputCommandInteraction, - deferred: DeferredPublicMessageInteractionResponseBehavior, + deferred: DeferredEphemeralMessageInteractionResponseBehavior, link: Link, search: String, silent: Boolean diff --git a/src/main/kotlin/de/limited_dev/botendo/commands/slash/util/InfoCommand.kt b/src/main/kotlin/de/limited_dev/botendo/commands/slash/util/InfoCommand.kt index 7daa0fe..bb46acb 100644 --- a/src/main/kotlin/de/limited_dev/botendo/commands/slash/util/InfoCommand.kt +++ b/src/main/kotlin/de/limited_dev/botendo/commands/slash/util/InfoCommand.kt @@ -23,13 +23,13 @@ import de.limited_dev.botendo.build.BuildConstants import de.limited_dev.botendo.commands.slash.component.SlashCommand import de.limited_dev.botendo.commands.slash.component.options.CommandOption import de.limited_dev.botendo.util.MessageUtil -import dev.kord.core.behavior.interaction.response.DeferredPublicMessageInteractionResponseBehavior +import dev.kord.core.behavior.interaction.response.DeferredEphemeralMessageInteractionResponseBehavior import dev.kord.core.entity.interaction.GuildChatInputCommandInteraction class InfoCommand : SlashCommand("info", "Shows infos about the bot", null) { override suspend fun onSlashCommand( interaction: GuildChatInputCommandInteraction, - deferred: DeferredPublicMessageInteractionResponseBehavior, + deferred: DeferredEphemeralMessageInteractionResponseBehavior, args: Map ) { MessageUtil.sendEmbedForInteraction(interaction, deferred, "Botendo v5", "ver." + BuildConstants.version) diff --git a/src/main/kotlin/de/limited_dev/botendo/util/MessageUtil.kt b/src/main/kotlin/de/limited_dev/botendo/util/MessageUtil.kt index 67f732f..a24999a 100644 --- a/src/main/kotlin/de/limited_dev/botendo/util/MessageUtil.kt +++ b/src/main/kotlin/de/limited_dev/botendo/util/MessageUtil.kt @@ -19,7 +19,7 @@ package de.limited_dev.botendo.util -import dev.kord.core.behavior.interaction.response.DeferredPublicMessageInteractionResponseBehavior +import dev.kord.core.behavior.interaction.response.DeferredEphemeralMessageInteractionResponseBehavior import dev.kord.core.behavior.interaction.response.respond import dev.kord.core.entity.interaction.GuildChatInputCommandInteraction import dev.kord.rest.builder.message.EmbedBuilder @@ -31,7 +31,7 @@ object MessageUtil { suspend fun sendEmbedForInteraction( interaction: GuildChatInputCommandInteraction, - deferred: DeferredPublicMessageInteractionResponseBehavior, + deferred: DeferredEphemeralMessageInteractionResponseBehavior, title: String, description: String ) { @@ -48,7 +48,7 @@ object MessageUtil { suspend fun sendEmbedForInteractionWithImage( interaction: GuildChatInputCommandInteraction, - deferred: DeferredPublicMessageInteractionResponseBehavior, + deferred: DeferredEphemeralMessageInteractionResponseBehavior, title: String, description: String, thumbnailUrl: String