chore: nothing

This commit is contained in:
2024-10-04 20:52:54 +08:00
parent c9c0f8e360
commit 9abbf2830a
2 files changed
+8

No files matched your search

@@ -8,6 +8,7 @@
package cn.rtast.fancybot.commands
import cn.rtast.fancybot.annotations.CommandDescription
import cn.rtast.fancybot.configManager
import cn.rtast.fancybot.enums.CommandAction
import cn.rtast.fancybot.util.file.insertActionRecord
import cn.rtast.rob.entity.GroupMessage
@@ -19,6 +20,10 @@ class EchoCommand : BaseCommand() {
override val commandNames = listOf("/echo")
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
if (message.sender.userId !in configManager.admins) {
message.reply("你不许用echo")
return
}
listener.sendGroupMessage(message.groupId, args.joinToString(" "))
insertActionRecord(CommandAction.Echo, message.sender.userId)
}