feat: add pay for manzi sub command

This commit is contained in:
2024-10-07 20:43:03 +08:00
parent af9a117561
commit 938ef0792a
2 files changed
+12 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
[versions] [versions]
kotlinVersion = "2.0.20" kotlinVersion = "2.0.20"
ronebotVersion = "1.12.9" ronebotVersion = "1.13.0"
shadowVersion = "8.3.0" shadowVersion = "8.3.0"
okhttpVersion = "5.0.0-alpha.14" okhttpVersion = "5.0.0-alpha.14"
exposedVersion = "0.53.0" exposedVersion = "0.53.0"
@@ -18,9 +18,18 @@ import java.net.URI
@CommandDescription("给我打钱!") @CommandDescription("给我打钱!")
class SupportMeCommand : BaseCommand() { class SupportMeCommand : BaseCommand() {
override val commandNames = listOf("打钱", "打钱", "support", "sp") override val commandNames = listOf("打钱", "满子打钱")
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) { override suspend fun executeGroup(
listener: OneBotListener,
message: GroupMessage,
args: List<String>,
matchedCommand: String
) {
if (matchedCommand == "给满子打钱") {
message.reply("你打牛魔呢?")
return
}
val image = URI("$ASSETS_BASE_URL/images/048cc8af57f19850ca176f29e50b6215.png") val image = URI("$ASSETS_BASE_URL/images/048cc8af57f19850ca176f29e50b6215.png")
.toURL().readBytes().encodeToBase64() .toURL().readBytes().encodeToBase64()
val msg = MessageChain.Builder() val msg = MessageChain.Builder()