feat: add reaction command

This commit is contained in:
2024-10-01 18:54:25 +08:00
parent bf9e6dd311
commit 805c6d56c2
4 files changed
+28 -4

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
[versions] [versions]
kotlinVersion = "2.0.10" kotlinVersion = "2.0.10"
ronebotVersion = "1.11.8" ronebotVersion = "1.12.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"
+3 -2
View File
@@ -95,7 +95,7 @@ val commands = listOf(
JueCommand(), ShortLinkCommand(), JueCommand(), ShortLinkCommand(),
ShotOtherCommand(), ReverseGIFCommand(), ShotOtherCommand(), ReverseGIFCommand(),
HelpCommand(), MusicCommand(), HelpCommand(), MusicCommand(),
LikeMeCommand(), NiuziTransferCommand(), SendLikeCommand(), NiuziTransferCommand(),
NiuziSignCommand(), NiuziJiJianCommand(), NiuziSignCommand(), NiuziJiJianCommand(),
NiuziQueryCommand(), MyNiuziCommand(), NiuziQueryCommand(), MyNiuziCommand(),
NiuziBankCommand(), WithdrawCommand(), NiuziBankCommand(), WithdrawCommand(),
@@ -104,5 +104,6 @@ val commands = listOf(
DMSearchCommand(), LlamaCommand(), DMSearchCommand(), LlamaCommand(),
QQMusicCommand(), BullShitGenerateCommand(), QQMusicCommand(), BullShitGenerateCommand(),
NiuziRankCommand(), NiuziBankRankCommand(), NiuziRankCommand(), NiuziBankRankCommand(),
ShotSelfCommand(), TenSetuCommand() ShotSelfCommand(), TenSetuCommand(),
ReactionCommand()
) )
@@ -0,0 +1,23 @@
/*
* Copyright © 2024 RTAkland
* Author: RTAkland
* Date: 2024/10/1
*/
package cn.rtast.fancybot.commands.misc
import cn.rtast.rob.entity.GroupMessage
import cn.rtast.rob.enums.QQFace
import cn.rtast.rob.util.BaseCommand
import cn.rtast.rob.util.ob.OneBotListener
class ReactionCommand : BaseCommand() {
override val commandNames = listOf("reaction", "回应")
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
(0..29).forEach { _ ->
message.reaction(QQFace.entries.random())
}
}
}
@@ -14,7 +14,7 @@ import cn.rtast.rob.util.ob.MessageChain
import cn.rtast.rob.util.ob.OneBotListener import cn.rtast.rob.util.ob.OneBotListener
@CommandDescription("资料卡点赞") @CommandDescription("资料卡点赞")
class LikeMeCommand : BaseCommand() { class SendLikeCommand : BaseCommand() {
override val commandNames = listOf("赞我") 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>) {