Files
FancyBot/src/main/kotlin/cn/rtast/fancybot/commands/AboutCommand.kt
T

34 lines
1.0 KiB
Kotlin
Raw Normal View History

2024-09-16 17:27:14 +08:00
/*
* Copyright © 2024 RTAkland
* Author: RTAkland
* Date: 2024/9/16
*/
package cn.rtast.fancybot.commands
import cn.rtast.fancybot.annotations.CommandDescription
2024-09-16 17:27:14 +08:00
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.OneBotListener
2024-09-16 17:27:14 +08:00
@CommandDescription("关于")
2024-09-16 17:27:14 +08:00
class AboutCommand : BaseCommand() {
override val commandNames = listOf("/about", "/关于")
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
2024-09-16 17:27:14 +08:00
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)
}
}