feat: add some command
This commit is contained in:
5 files changed
+66
-12
No files matched your search
@@ -8,6 +8,8 @@
|
||||
package cn.rtast.fancybot
|
||||
|
||||
import cn.rtast.fancybot.commands.EchoCommand
|
||||
import cn.rtast.fancybot.commands.FKXQSCommand
|
||||
import cn.rtast.fancybot.commands.HitokotoCommand
|
||||
import cn.rtast.fancybot.commands.JrrpCommand
|
||||
import cn.rtast.fancybot.commands.MusicCommand
|
||||
import cn.rtast.fancybot.commands.MyPointCommand
|
||||
@@ -30,7 +32,9 @@ val commands = listOf(
|
||||
JrrpCommand(),
|
||||
MusicCommand(),
|
||||
SignCommand(),
|
||||
MyPointCommand()
|
||||
MyPointCommand(),
|
||||
HitokotoCommand(),
|
||||
FKXQSCommand()
|
||||
)
|
||||
|
||||
val configManager = ConfigManager()
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright © 2024 RTAkland
|
||||
* Author: RTAkland
|
||||
* Date: 2024/8/30
|
||||
*/
|
||||
|
||||
|
||||
package cn.rtast.fancybot.commands
|
||||
|
||||
import cn.rtast.fancybot.entity.fkxqs.FKXQS
|
||||
import cn.rtast.fancybot.util.Http
|
||||
import cn.rtast.rob.entity.GroupMessage
|
||||
import cn.rtast.rob.util.BaseCommand
|
||||
import cn.rtast.rob.util.ob.OBMessage
|
||||
|
||||
class FKXQSCommand: BaseCommand() {
|
||||
override val commandNames = listOf("/fkxqs", "/fk", "/疯狂星期四")
|
||||
|
||||
override suspend fun executeGroup(listener: OBMessage, message: GroupMessage, args: List<String>) {
|
||||
val response = Http.get<FKXQS>("https://api.shadiao.pro/kfc").data.text
|
||||
listener.sendGroupMessage(message.groupId, response)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright © 2024 RTAkland
|
||||
* Author: RTAkland
|
||||
* Date: 2024/8/30
|
||||
*/
|
||||
|
||||
|
||||
package cn.rtast.fancybot.commands
|
||||
|
||||
import cn.rtast.fancybot.util.Http
|
||||
import cn.rtast.rob.entity.GroupMessage
|
||||
import cn.rtast.rob.util.BaseCommand
|
||||
import cn.rtast.rob.util.ob.OBMessage
|
||||
|
||||
class HitokotoCommand : BaseCommand() {
|
||||
override val commandNames = listOf("/hitokoto", "/1")
|
||||
|
||||
override suspend fun executeGroup(listener: OBMessage, message: GroupMessage, args: List<String>) {
|
||||
val response = Http.get("https://v1.jinrishici.com/rensheng/mengxiang.txt")
|
||||
listener.sendGroupMessage(message.groupId, response)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright © 2024 RTAkland
|
||||
* Author: RTAkland
|
||||
* Date: 2024/8/30
|
||||
*/
|
||||
|
||||
|
||||
package cn.rtast.fancybot.entity.fkxqs
|
||||
|
||||
data class FKXQS(
|
||||
val data: Data,
|
||||
) {
|
||||
data class Data(
|
||||
val text: String,
|
||||
)
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2024 RTAkland
|
||||
* Author: RTAkland
|
||||
* Date: 2024/8/30
|
||||
*/
|
||||
|
||||
|
||||
package cn.rtast.fancybot.entity.jrrp
|
||||
|
||||
class SignRecord {
|
||||
}
|
||||
Reference in New Issue
Block a user