Skip to content

Commit def6ef4

Browse files
committed
tests: Fix deprecated usages in SlashThreadById
1 parent 67b4174 commit def6ef4

File tree

1 file changed

+2
-2
lines changed
  • BotCommands-core/src/test/kotlin/io/github/freya022/botcommands/test/commands/slash

1 file changed

+2
-2
lines changed

BotCommands-core/src/test/kotlin/io/github/freya022/botcommands/test/commands/slash/SlashThreadById.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package io.github.freya022.botcommands.test.commands.slash
22

33
import dev.freya02.botcommands.jda.ktx.messages.reply_
4-
import dev.freya02.botcommands.jda.ktx.retrieve.retrieveThreadChannelOrNull
4+
import dev.freya02.botcommands.jda.ktx.retrieve.retrieveThreadChannelByIdOrNull
55
import io.github.freya022.botcommands.api.commands.annotations.Command
66
import io.github.freya022.botcommands.api.commands.application.ApplicationCommand
77
import io.github.freya022.botcommands.api.commands.application.slash.GuildSlashEvent
@@ -12,7 +12,7 @@ import io.github.freya022.botcommands.api.commands.application.slash.annotations
1212
class SlashThreadById : ApplicationCommand() {
1313
@JDASlashCommand(name = "thread_by_id")
1414
suspend fun execute(event: GuildSlashEvent, @SlashOption id: String) {
15-
val threadChannel = event.guild.retrieveThreadChannelOrNull(id.toLong())
15+
val threadChannel = event.guild.retrieveThreadChannelByIdOrNull(id.toLong())
1616
event.reply_(threadChannel?.asMention.toString(), ephemeral = true).queue()
1717
}
1818
}

0 commit comments

Comments
 (0)