From 938ef0792a4bbec85ccd7f03e2eb96425135907e Mon Sep 17 00:00:00 2001 From: RTAkland Date: Mon, 7 Oct 2024 20:43:03 +0800 Subject: [PATCH] feat: add pay for manzi sub command --- gradle/libs.versions.toml | 2 +- .../cn/rtast/fancybot/commands/SupportMeCommand.kt | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b29316d..9154156 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlinVersion = "2.0.20" -ronebotVersion = "1.12.9" +ronebotVersion = "1.13.0" shadowVersion = "8.3.0" okhttpVersion = "5.0.0-alpha.14" exposedVersion = "0.53.0" diff --git a/src/main/kotlin/cn/rtast/fancybot/commands/SupportMeCommand.kt b/src/main/kotlin/cn/rtast/fancybot/commands/SupportMeCommand.kt index 2ff9591..4afe827 100644 --- a/src/main/kotlin/cn/rtast/fancybot/commands/SupportMeCommand.kt +++ b/src/main/kotlin/cn/rtast/fancybot/commands/SupportMeCommand.kt @@ -18,9 +18,18 @@ import java.net.URI @CommandDescription("给我打钱!") class SupportMeCommand : BaseCommand() { - override val commandNames = listOf("打钱", "给我打钱", "support", "sp") + override val commandNames = listOf("打钱", "给满子打钱") - override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List) { + override suspend fun executeGroup( + listener: OneBotListener, + message: GroupMessage, + args: List, + matchedCommand: String + ) { + if (matchedCommand == "给满子打钱") { + message.reply("你打牛魔呢?") + return + } val image = URI("$ASSETS_BASE_URL/images/048cc8af57f19850ca176f29e50b6215.png") .toURL().readBytes().encodeToBase64() val msg = MessageChain.Builder()