feat: add some command

This commit is contained in:
2024-08-30 16:42:53 +08:00
parent 54945dd55e
commit e56260bdd6
5 files changed
+66 -12

No files matched your search

@@ -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)
}
}