chore: bump rob
This commit is contained in:
118 files changed
+208
-303
No files matched your search
@@ -14,7 +14,6 @@ import cn.rtast.fancybot.util.str.encodeToBase64
|
||||
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
|
||||
|
||||
@CommandDescription("随机HTTP猫猫")
|
||||
class HTTPCatCommand : BaseCommand() {
|
||||
@@ -26,7 +25,7 @@ class HTTPCatCommand : BaseCommand() {
|
||||
return Resources.loadFromResourcesAsBytes("httpcat/${code}.jpg")?.encodeToBase64() ?: notFoundCatBase64
|
||||
}
|
||||
|
||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
||||
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||
val statusCode = if (args.isEmpty()) HttpStatusCode.entries.random().code.toString() else args.first()
|
||||
val image = loadHTTPCat(statusCode)
|
||||
val msg = MessageChain.Builder().addImage(image, true).build()
|
||||
|
||||
Reference in New Issue
Block a user