feat: add like me command
This commit is contained in:
2 files changed
+27
-1
No files matched your search
@@ -98,7 +98,7 @@ val commands = listOf(
|
|||||||
RemakeCommand(), PixivCommand(),
|
RemakeCommand(), PixivCommand(),
|
||||||
RUACommand(), NslookupCommand(),
|
RUACommand(), NslookupCommand(),
|
||||||
NiuziSignCommand(), MyNiuziSignCommand(),
|
NiuziSignCommand(), MyNiuziSignCommand(),
|
||||||
JiJianCommand()
|
JiJianCommand(), LikeMeCommand()
|
||||||
)
|
)
|
||||||
|
|
||||||
suspend fun main() {
|
suspend fun main() {
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 RTAkland
|
||||||
|
* Author: RTAkland
|
||||||
|
* Date: 2024/9/8
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
package cn.rtast.fancybot.commands
|
||||||
|
|
||||||
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
|
import cn.rtast.rob.util.BaseCommand
|
||||||
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
|
import cn.rtast.rob.util.ob.OBMessage
|
||||||
|
|
||||||
|
class LikeMeCommand : BaseCommand() {
|
||||||
|
override val commandNames = listOf("赞我")
|
||||||
|
|
||||||
|
override suspend fun executeGroup(listener: OBMessage, message: GroupMessage, args: List<String>) {
|
||||||
|
listener.sendLike(message.sender.userId, 10)
|
||||||
|
val msg = MessageChain.Builder()
|
||||||
|
.addReply(message.messageId)
|
||||||
|
.addText("👍了你十下~~😁")
|
||||||
|
.build()
|
||||||
|
listener.sendGroupMessage(message.groupId, msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user