From 1b7f09732f993ae642928251cc75f00e7dcd55be Mon Sep 17 00:00:00 2001 From: RTAkland Date: Thu, 17 Oct 2024 21:36:45 +0800 Subject: [PATCH] feat: add today dont eat/drink command --- src/main/kotlin/cn/rtast/fancybot/Const.kt | 3 ++- .../commands/misc/TodayEatDrinkCommand.kt | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/cn/rtast/fancybot/Const.kt b/src/main/kotlin/cn/rtast/fancybot/Const.kt index 6d8e035..f1bf8eb 100644 --- a/src/main/kotlin/cn/rtast/fancybot/Const.kt +++ b/src/main/kotlin/cn/rtast/fancybot/Const.kt @@ -139,5 +139,6 @@ val commands = listOf( SupportMeCommand(), TheCatCommand(), TheHistoryOfTodayCommand(), MCVersionCommand(), MinecraftWikiCommand(), GaoKaoDaysRemainCommand(), IdiomExplainCommand(), NiuziManagerCommand(), TodayEatCommand(), TodayDrinkCommand(), MCLoginCommand(), RCONCommand(), - GravatarCommand(), PastebinCommand(), ShuffleEchoCommand() + GravatarCommand(), PastebinCommand(), ShuffleEchoCommand(), TodayDontEatCommand(), + TodayDontDrinkCommand() ) \ No newline at end of file diff --git a/src/main/kotlin/cn/rtast/fancybot/commands/misc/TodayEatDrinkCommand.kt b/src/main/kotlin/cn/rtast/fancybot/commands/misc/TodayEatDrinkCommand.kt index c91b7f2..c0d1c22 100644 --- a/src/main/kotlin/cn/rtast/fancybot/commands/misc/TodayEatDrinkCommand.kt +++ b/src/main/kotlin/cn/rtast/fancybot/commands/misc/TodayEatDrinkCommand.kt @@ -34,6 +34,15 @@ class TodayEatCommand : BaseCommand() { } } +@CommandDescription("今天不吃什么") +class TodayDontEatCommand : BaseCommand() { + override val commandNames = listOf("今天不吃什么") + + override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List) { + message.reply("你吃个结巴, 是吧") + } +} + @CommandDescription("今天喝什么") class TodayDrinkCommand : BaseCommand() { override val commandNames = listOf("今天喝什么") @@ -48,4 +57,13 @@ class TodayDrinkCommand : BaseCommand() { override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List) { message.reply("今天喝${drinkList.random()}吧~") } +} + +@CommandDescription("今天不吃什么") +class TodayDontDrinkCommand : BaseCommand() { + override val commandNames = listOf("今天不喝什么") + + override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List) { + message.reply("你喝个结巴, 是吧") + } } \ No newline at end of file