feat: add about command
This commit is contained in:
2 files changed
+33
-1
No files matched your search
@@ -149,7 +149,7 @@ val commands = listOf(
|
|||||||
NiuziSignCommand(), MyNiuziCommand(),
|
NiuziSignCommand(), MyNiuziCommand(),
|
||||||
JiJianCommand(), LikeMeCommand(),
|
JiJianCommand(), LikeMeCommand(),
|
||||||
CompilerCommand(), GPTCommand(),
|
CompilerCommand(), GPTCommand(),
|
||||||
GithubUserCommand()
|
GithubUserCommand(), AboutCommand()
|
||||||
)
|
)
|
||||||
|
|
||||||
suspend fun main() {
|
suspend fun main() {
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright © 2024 RTAkland
|
||||||
|
* Author: RTAkland
|
||||||
|
* Date: 2024/9/16
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
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 AboutCommand : BaseCommand() {
|
||||||
|
override val commandNames = listOf("/about", "/关于")
|
||||||
|
|
||||||
|
override suspend fun executeGroup(listener: OBMessage, message: GroupMessage, args: List<String>) {
|
||||||
|
val msg = MessageChain.Builder()
|
||||||
|
.addAt(message.sender.userId)
|
||||||
|
.addNewLine()
|
||||||
|
.addText("Bot名称: FancyBot")
|
||||||
|
.addNewLine()
|
||||||
|
.addText("作者: RTAkland")
|
||||||
|
.addNewLine()
|
||||||
|
.addText("联系方式: me@rtast.cn")
|
||||||
|
.addNewLine()
|
||||||
|
.addText("项目地址: https://repo.rtast.cn/RTAkland/FancyBot")
|
||||||
|
.build()
|
||||||
|
listener.sendGroupMessage(message.groupId, msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user