chore: bump rob
This commit is contained in:
118 files changed
+208
-303
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
[versions]
|
[versions]
|
||||||
kotlinVersion = "2.0.20"
|
kotlinVersion = "2.0.20"
|
||||||
ronebotVersion = "2.2.0"
|
ronebotVersion = "2.2.1"
|
||||||
shadowVersion = "8.3.0"
|
shadowVersion = "8.3.0"
|
||||||
okhttpVersion = "5.0.0-alpha.14"
|
okhttpVersion = "5.0.0-alpha.14"
|
||||||
exposedVersion = "0.53.0"
|
exposedVersion = "0.53.0"
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import cn.rtast.fancybot.util.str.toJson
|
|||||||
import cn.rtast.rob.ROneBotFactory
|
import cn.rtast.rob.ROneBotFactory
|
||||||
import cn.rtast.rob.entity.*
|
import cn.rtast.rob.entity.*
|
||||||
import cn.rtast.rob.entity.custom.BeKickEvent
|
import cn.rtast.rob.entity.custom.BeKickEvent
|
||||||
|
import cn.rtast.rob.entity.custom.ErrorEvent
|
||||||
import cn.rtast.rob.entity.custom.MemberKickEvent
|
import cn.rtast.rob.entity.custom.MemberKickEvent
|
||||||
import cn.rtast.rob.entity.custom.MemberLeaveEvent
|
import cn.rtast.rob.entity.custom.MemberLeaveEvent
|
||||||
import cn.rtast.rob.entity.lagrange.FileEvent
|
import cn.rtast.rob.entity.lagrange.FileEvent
|
||||||
@@ -87,8 +88,8 @@ class FancyBot : OneBotListener {
|
|||||||
ReverseGIFCommand.callback(message)
|
ReverseGIFCommand.callback(message)
|
||||||
AsciiArtCommand.callback(message)
|
AsciiArtCommand.callback(message)
|
||||||
ScanQRCodeCommand.callback(message)
|
ScanQRCodeCommand.callback(message)
|
||||||
BiliVideoParseCommand.parse(this, message)
|
BiliVideoParseCommand.parse(message)
|
||||||
BiliUserParseCommand.parse(this, message)
|
BiliUserParseCommand.parse(message)
|
||||||
DouyinVideoParseCommand.parse(message)
|
DouyinVideoParseCommand.parse(message)
|
||||||
YoutubeVideoParseCommand.parse(message)
|
YoutubeVideoParseCommand.parse(message)
|
||||||
|
|
||||||
@@ -202,8 +203,8 @@ class FancyBot : OneBotListener {
|
|||||||
message.action.sendGroupMessage(message.groupId, msg)
|
message.action.sendGroupMessage(message.groupId, msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun onWebsocketErrorEvent(action: OneBotAction, ex: Exception) {
|
override suspend fun onWebsocketErrorEvent(event: ErrorEvent) {
|
||||||
ex.printStackTrace()
|
event.exception.printStackTrace()
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun onAddFriendRequest(event: AddFriendRequestEvent) {
|
override suspend fun onAddFriendRequest(event: AddFriendRequestEvent) {
|
||||||
|
|||||||
@@ -11,13 +11,12 @@ import cn.rtast.fancybot.annotations.CommandDescription
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("关于")
|
@CommandDescription("关于")
|
||||||
class AboutCommand : BaseCommand() {
|
class AboutCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("/about", "/关于")
|
override val commandNames = listOf("/about", "/关于")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("Bot名称: FancyBot")
|
.addText("Bot名称: FancyBot")
|
||||||
.addNewLine()
|
.addNewLine()
|
||||||
|
|||||||
@@ -12,13 +12,12 @@ import cn.rtast.fancybot.enums.CommandAction
|
|||||||
import cn.rtast.fancybot.util.file.insertActionRecord
|
import cn.rtast.fancybot.util.file.insertActionRecord
|
||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("Echo")
|
@CommandDescription("Echo")
|
||||||
class EchoCommand : BaseCommand() {
|
class EchoCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("/echo")
|
override val commandNames = listOf("/echo")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (message.sender.isAdmin || message.sender.isOwner) {
|
if (message.sender.isAdmin || message.sender.isOwner) {
|
||||||
message.reply(args.joinToString(" "))
|
message.reply(args.joinToString(" "))
|
||||||
insertActionRecord(CommandAction.Echo, message.sender.userId)
|
insertActionRecord(CommandAction.Echo, message.sender.userId)
|
||||||
@@ -32,7 +31,7 @@ class EchoCommand : BaseCommand() {
|
|||||||
class ShuffleEchoCommand : BaseCommand() {
|
class ShuffleEchoCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("/secho", "/se")
|
override val commandNames = listOf("/secho", "/se")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (message.sender.isAdmin || message.sender.isOwner) {
|
if (message.sender.isAdmin || message.sender.isOwner) {
|
||||||
message.reply(message.rawMessage.toList().shuffled().joinToString(""))
|
message.reply(message.rawMessage.toList().shuffled().joinToString(""))
|
||||||
insertActionRecord(CommandAction.Echo, message.sender.userId)
|
insertActionRecord(CommandAction.Echo, message.sender.userId)
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.NodeMessageChain
|
import cn.rtast.rob.util.ob.NodeMessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import kotlin.reflect.full.findAnnotation
|
import kotlin.reflect.full.findAnnotation
|
||||||
import kotlin.reflect.full.hasAnnotation
|
import kotlin.reflect.full.hasAnnotation
|
||||||
|
|
||||||
@@ -22,7 +21,7 @@ import kotlin.reflect.full.hasAnnotation
|
|||||||
class HelpCommand : BaseCommand() {
|
class HelpCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("/help", "/帮助")
|
override val commandNames = listOf("/help", "/帮助")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val node = NodeMessageChain.Builder()
|
val node = NodeMessageChain.Builder()
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
|
|||||||
@@ -14,14 +14,13 @@ import cn.rtast.fancybot.util.file.insertActionRecord
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
|
|
||||||
@CommandDescription("状态")
|
@CommandDescription("状态")
|
||||||
class StatusCommand : BaseCommand() {
|
class StatusCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("/status")
|
override val commandNames = listOf("/status")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val runtime = Runtime.getRuntime()
|
val runtime = Runtime.getRuntime()
|
||||||
val maxMemory = runtime.maxMemory() / (1024 * 1024)
|
val maxMemory = runtime.maxMemory() / (1024 * 1024)
|
||||||
val allocatedMemory = runtime.totalMemory() / (1024 * 1024)
|
val allocatedMemory = runtime.totalMemory() / (1024 * 1024)
|
||||||
|
|||||||
@@ -13,19 +13,13 @@ import cn.rtast.fancybot.util.str.encodeToBase64
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
@CommandDescription("给我打钱!")
|
@CommandDescription("给我打钱!")
|
||||||
class SupportMeCommand : BaseCommand() {
|
class SupportMeCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("打钱", "给我打钱", "给满子打钱")
|
override val commandNames = listOf("打钱", "给我打钱", "给满子打钱")
|
||||||
|
|
||||||
override suspend fun executeGroup(
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>, matchedCommand: String) {
|
||||||
listener: OneBotListener,
|
|
||||||
message: GroupMessage,
|
|
||||||
args: List<String>,
|
|
||||||
matchedCommand: String
|
|
||||||
) {
|
|
||||||
if (matchedCommand == "给满子打钱") {
|
if (matchedCommand == "给满子打钱") {
|
||||||
message.reply("你打牛魔呢?")
|
message.reply("你打牛魔呢?")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.NodeMessageChain
|
import cn.rtast.rob.util.ob.NodeMessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("问AI(GPT)")
|
@CommandDescription("问AI(GPT)")
|
||||||
class AICommand : BaseCommand() {
|
class AICommand : BaseCommand() {
|
||||||
@@ -29,7 +28,7 @@ class AICommand : BaseCommand() {
|
|||||||
|
|
||||||
private val openAIModel = configManager.openAIModel
|
private val openAIModel = configManager.openAIModel
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("发送`/ai [模型] <问题>`即可询问AI哦~")
|
.addText("发送`/ai [模型] <问题>`即可询问AI哦~")
|
||||||
@@ -81,7 +80,7 @@ class LlamaCommand : BaseCommand() {
|
|||||||
private val llamaURL = configManager.llamaUrl
|
private val llamaURL = configManager.llamaUrl
|
||||||
private val llamaModel = configManager.llamaModel
|
private val llamaModel = configManager.llamaModel
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`/llama <问题>`即可使用llama模型来回复")
|
message.reply("发送`/llama <问题>`即可使用llama模型来回复")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.NodeMessageChain
|
import cn.rtast.rob.util.ob.NodeMessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
|
||||||
@@ -37,7 +36,7 @@ class AnimeSearchCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`/dm <关键词>`即可搜索番剧啦~")
|
message.reply("发送`/dm <关键词>`即可搜索番剧啦~")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.NodeMessageChain
|
import cn.rtast.rob.util.ob.NodeMessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
@CommandDescription("查询香烟价格")
|
@CommandDescription("查询香烟价格")
|
||||||
@@ -25,7 +24,7 @@ class CigaretteCommand : BaseCommand() {
|
|||||||
|
|
||||||
private val apiUrl = "https://www.yanyue.cn/api/rc/product/yanlist"
|
private val apiUrl = "https://www.yanyue.cn/api/rc/product/yanlist"
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("发送/tobacco <名称> [数量] 来搜索结果哦~")
|
.addText("发送/tobacco <名称> [数量] 来搜索结果哦~")
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import cn.rtast.fancybot.util.str.toJson
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import java.awt.Color
|
import java.awt.Color
|
||||||
import java.awt.Font
|
import java.awt.Font
|
||||||
import java.awt.image.BufferedImage
|
import java.awt.image.BufferedImage
|
||||||
@@ -61,7 +60,7 @@ class DomainPriceCommand : BaseCommand() {
|
|||||||
domain: String,
|
domain: String,
|
||||||
available: Boolean,
|
available: Boolean,
|
||||||
premium: Boolean,
|
premium: Boolean,
|
||||||
domainPrice: Pair<Int, Int>
|
domainPrice: Pair<Int, Int>,
|
||||||
): String {
|
): String {
|
||||||
val canvas = this.createCommonCanvas()
|
val canvas = this.createCommonCanvas()
|
||||||
val g2d = canvas.createGraphics()
|
val g2d = canvas.createGraphics()
|
||||||
@@ -77,7 +76,7 @@ class DomainPriceCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("发送`/domain <域名>`即可查询对应的注册和续费价格~")
|
.addText("发送`/domain <域名>`即可查询对应的注册和续费价格~")
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import cn.rtast.fancybot.util.str.fromArrayJson
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("查询Github上的仓库的最新一次的提交信息")
|
@CommandDescription("查询Github上的仓库的最新一次的提交信息")
|
||||||
class GithubLatestCommitCommand : BaseCommand() {
|
class GithubLatestCommitCommand : BaseCommand() {
|
||||||
@@ -24,7 +23,7 @@ class GithubLatestCommitCommand : BaseCommand() {
|
|||||||
|
|
||||||
private val userInfoUrl = "https://api.github.com/repos"
|
private val userInfoUrl = "https://api.github.com/repos"
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`.commit <用户名/仓库名>`即可查询仓库最新一次的提交信息")
|
message.reply("发送`.commit <用户名/仓库名>`即可查询仓库最新一次的提交信息")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import cn.rtast.fancybot.util.str.encodeToBase64
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import java.awt.Color
|
import java.awt.Color
|
||||||
import java.awt.Font
|
import java.awt.Font
|
||||||
import java.awt.image.BufferedImage
|
import java.awt.image.BufferedImage
|
||||||
@@ -67,7 +66,7 @@ class GithubUserCommand : BaseCommand() {
|
|||||||
return canvas.toByteArray().encodeToBase64()
|
return canvas.toByteArray().encodeToBase64()
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val msg = MessageChain.Builder().addText("发送`gh <用户名>`即可查询用户的信息~").build()
|
val msg = MessageChain.Builder().addText("发送`gh <用户名>`即可查询用户的信息~").build()
|
||||||
message.reply(msg)
|
message.reply(msg)
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import cn.rtast.fancybot.util.str.getMD5
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("查询用户的Gravatar头像")
|
@CommandDescription("查询用户的Gravatar头像")
|
||||||
class GravatarCommand : BaseCommand() {
|
class GravatarCommand : BaseCommand() {
|
||||||
@@ -24,7 +23,7 @@ class GravatarCommand : BaseCommand() {
|
|||||||
private const val GRAVATAR_URL = "https://gravatar.rtast.cn/avatar"
|
private const val GRAVATAR_URL = "https://gravatar.rtast.cn/avatar"
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val emailMD5 = if (args.first().trim().lowercase().contains("@")) args.first().trim().lowercase().getMD5()
|
val emailMD5 = if (args.first().trim().lowercase().contains("@")) args.first().trim().lowercase().getMD5()
|
||||||
else args.first().trim().lowercase()
|
else args.first().trim().lowercase()
|
||||||
val avatarImage = "$GRAVATAR_URL/$emailMD5?size=256".toURL().readBytes().encodeToBase64()
|
val avatarImage = "$GRAVATAR_URL/$emailMD5?size=256".toURL().readBytes().encodeToBase64()
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import cn.rtast.fancybot.util.Http
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("解释一个成语")
|
@CommandDescription("解释一个成语")
|
||||||
class IdiomExplainCommand : BaseCommand() {
|
class IdiomExplainCommand : BaseCommand() {
|
||||||
@@ -22,7 +21,7 @@ class IdiomExplainCommand : BaseCommand() {
|
|||||||
|
|
||||||
private val apiSpaceUrl = "https://eolink.o.apispace.com/cyudac/api/v1/idioms/SearchIdiomsByPinyin/search"
|
private val apiSpaceUrl = "https://eolink.o.apispace.com/cyudac/api/v1/idioms/SearchIdiomsByPinyin/search"
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`成语解释 <成语>`就能解释这个成语的意思了")
|
message.reply("发送`成语解释 <成语>`就能解释这个成语的意思了")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.enums.MusicShareType
|
import cn.rtast.rob.enums.MusicShareType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
|
|
||||||
@CommandDescription("网易云音乐点歌")
|
@CommandDescription("网易云音乐点歌")
|
||||||
@@ -38,7 +37,7 @@ class MusicCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun legacyMusicCommand(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
private suspend fun legacyMusicCommand(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`/点歌` <关键词> 来搜索音乐~")
|
message.reply("发送`/点歌` <关键词> 来搜索音乐~")
|
||||||
return
|
return
|
||||||
@@ -93,9 +92,9 @@ class MusicCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.last() == "legacy" || args.last() == "l" || args.last() in "0".."4") {
|
if (args.last() == "legacy" || args.last() == "l" || args.last() in "0".."4") {
|
||||||
this.legacyMusicCommand(listener, message, args)
|
this.legacyMusicCommand(message, args)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
@@ -128,7 +127,7 @@ class MusicPlayUrlCommand : BaseCommand() {
|
|||||||
return Http.get<SongUrl>("$musicApiUrl/song/url", mapOf("id" to id)).data.first().url
|
return Http.get<SongUrl>("$musicApiUrl/song/url", mapOf("id" to id)).data.first().url
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val url = if (args.last() == "id" || args.last() == "i") {
|
val url = if (args.last() == "id" || args.last() == "i") {
|
||||||
val id = args.first()
|
val id = args.first()
|
||||||
this.getPlayUrl(id)
|
this.getPlayUrl(id)
|
||||||
@@ -151,7 +150,7 @@ class QQMusicCommand : BaseCommand() {
|
|||||||
|
|
||||||
private val qqMusicApiUrl = configManager.qqMusicApiUrl
|
private val qqMusicApiUrl = configManager.qqMusicApiUrl
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`/qm <关键词>`即可搜索qq音乐的音乐哦")
|
message.reply("发送`/qm <关键词>`即可搜索qq音乐的音乐哦")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import cn.rtast.fancybot.util.Http
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import cn.rtast.rob.util.ob.asNode
|
import cn.rtast.rob.util.ob.asNode
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
@@ -52,7 +51,7 @@ class NslookupCommand : BaseCommand() {
|
|||||||
|
|
||||||
private fun geo(ip: String) = Http.get<IPGeo>(IP_INFO_API.replace("###", ip))
|
private fun geo(ip: String) = Http.get<IPGeo>(IP_INFO_API.replace("###", ip))
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val host = args.first()
|
val host = args.first()
|
||||||
val nsType = if (args.size == 3) args[1] else "common"
|
val nsType = if (args.size == 3) args[1] else "common"
|
||||||
val srvType = if (args.size == 3) args.last() else "mc"
|
val srvType = if (args.size == 3) args.last() else "mc"
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.NodeMessageChain
|
import cn.rtast.rob.util.ob.NodeMessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
@CommandDescription("获取Pixiv上的图片")
|
@CommandDescription("获取Pixiv上的图片")
|
||||||
@@ -26,7 +25,7 @@ class PixivCommand : BaseCommand() {
|
|||||||
private val pixivRankingURL = "https://proxy.rtast.cn/https/www.pixiv.net/ranking.php?format=json&mode=daily&p=1"
|
private val pixivRankingURL = "https://proxy.rtast.cn/https/www.pixiv.net/ranking.php?format=json&mode=daily&p=1"
|
||||||
private val imageProxyURL = "https://pixiv.re"
|
private val imageProxyURL = "https://pixiv.re"
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("发送`/pixiv <id> | rank` 来进行操作哦~")
|
.addText("发送`/pixiv <id> | rank` 来进行操作哦~")
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import cn.rtast.rob.enums.ArrayMessageType
|
|||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.NodeMessageChain
|
import cn.rtast.rob.util.ob.NodeMessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
|
|
||||||
private fun generateNodeMessage(targetId: String, times: Int = 10): NodeMessageChain {
|
private fun generateNodeMessage(targetId: String, times: Int = 10): NodeMessageChain {
|
||||||
@@ -29,7 +28,7 @@ private fun generateNodeMessage(targetId: String, times: Int = 10): NodeMessageC
|
|||||||
class ShotSelfCommand : BaseCommand() {
|
class ShotSelfCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("骂我")
|
override val commandNames = listOf("骂我")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
message.action.sendGroupForwardMsg(message.groupId, generateNodeMessage(message.sender.userId.toString()))
|
message.action.sendGroupForwardMsg(message.groupId, generateNodeMessage(message.sender.userId.toString()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,7 +37,7 @@ class ShotSelfCommand : BaseCommand() {
|
|||||||
class ShotOtherCommand : BaseCommand() {
|
class ShotOtherCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("骂")
|
override val commandNames = listOf("骂")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.action.sendGroupForwardMsg(
|
message.action.sendGroupForwardMsg(
|
||||||
message.groupId, generateNodeMessage(message.sender.userId.toString(), 20)
|
message.groupId, generateNodeMessage(message.sender.userId.toString(), 20)
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import cn.rtast.fancybot.util.str.proxy
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("随机猫猫图")
|
@CommandDescription("随机猫猫图")
|
||||||
class TheCatCommand : BaseCommand() {
|
class TheCatCommand : BaseCommand() {
|
||||||
@@ -25,7 +24,7 @@ class TheCatCommand : BaseCommand() {
|
|||||||
|
|
||||||
private val theCatApiUrl = "https://api.thecatapi.com/v1/images/search"
|
private val theCatApiUrl = "https://api.thecatapi.com/v1/images/search"
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val imageBase64 = Http.get(theCatApiUrl)
|
val imageBase64 = Http.get(theCatApiUrl)
|
||||||
.fromArrayJson<List<Cat>>().first().url
|
.fromArrayJson<List<Cat>>().first().url
|
||||||
.proxy.toURL().readBytes().encodeToBase64()
|
.proxy.toURL().readBytes().encodeToBase64()
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import cn.rtast.fancybot.util.Http
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import cn.rtast.rob.util.ob.asNode
|
import cn.rtast.rob.util.ob.asNode
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
import java.time.ZoneId
|
import java.time.ZoneId
|
||||||
@@ -27,7 +26,7 @@ class TheHistoryOfTodayCommand : BaseCommand() {
|
|||||||
private val tianXingApiUrl = "https://apis.tianapi.com/lishi/index"
|
private val tianXingApiUrl = "https://apis.tianapi.com/lishi/index"
|
||||||
private val tianXingApiKey = configManager.tianXingApiKey
|
private val tianXingApiKey = configManager.tianXingApiKey
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val currentDateTime = LocalDateTime.now(ZoneId.of("Asia/Shanghai"))
|
val currentDateTime = LocalDateTime.now(ZoneId.of("Asia/Shanghai"))
|
||||||
val formatter = DateTimeFormatter.ofPattern("MMdd")
|
val formatter = DateTimeFormatter.ofPattern("MMdd")
|
||||||
val currentDate = currentDateTime.format(formatter)
|
val currentDate = currentDateTime.format(formatter)
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import cn.rtast.fancybot.util.str.encodeToBase64
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import java.awt.Color
|
import java.awt.Color
|
||||||
import java.awt.Font
|
import java.awt.Font
|
||||||
import java.awt.image.BufferedImage
|
import java.awt.image.BufferedImage
|
||||||
@@ -58,7 +57,7 @@ class WeatherCommand : BaseCommand() {
|
|||||||
return emptyImage.toByteArray().encodeToBase64()
|
return emptyImage.toByteArray().encodeToBase64()
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addAt(message.sender.userId)
|
.addAt(message.sender.userId)
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import cn.rtast.fancybot.util.file.insertActionRecord
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
|
|
||||||
@CommandDescription("查询wiki百科")
|
@CommandDescription("查询wiki百科")
|
||||||
@@ -32,7 +31,7 @@ class WikipediaCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("发送`/wiki <关键字>`即可查询出最匹配的wiki页面~")
|
.addText("发送`/wiki <关键字>`即可查询出最匹配的wiki页面~")
|
||||||
|
|||||||
@@ -14,13 +14,12 @@ import cn.rtast.rob.entity.ArrayMessage
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("防撤回(获取消息)")
|
@CommandDescription("防撤回(获取消息)")
|
||||||
class AntiRevokeCommand : BaseCommand() {
|
class AntiRevokeCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("/revoke", "/rv")
|
override val commandNames = listOf("/revoke", "/rv")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (message.sender.isAdmin || message.sender.isOwner) {
|
if (message.sender.isAdmin || message.sender.isOwner) {
|
||||||
val messageId = args.first().toLong()
|
val messageId = args.first().toLong()
|
||||||
val getMsg = message.action.getMessage(messageId)
|
val getMsg = message.action.getMessage(messageId)
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.NodeMessageChain
|
import cn.rtast.rob.util.ob.NodeMessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import kotlin.random.Random
|
import kotlin.random.Random
|
||||||
|
|
||||||
@CommandDescription("狗屁不通文章生成器")
|
@CommandDescription("狗屁不通文章生成器")
|
||||||
@@ -47,7 +46,7 @@ class BullShitGenerateCommand : BaseCommand() {
|
|||||||
return ".\n\n "
|
return ".\n\n "
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val topic = args.joinToString(" ")
|
val topic = args.joinToString(" ")
|
||||||
val nextFamousQuote = shuffleList(bullShitData.famous)
|
val nextFamousQuote = shuffleList(bullShitData.famous)
|
||||||
val nextBosh = shuffleList(bullShitData.bosh)
|
val nextBosh = shuffleList(bullShitData.bosh)
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import cn.rtast.fancybot.util.str.toJson
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("执行不同语言的代码")
|
@CommandDescription("执行不同语言的代码")
|
||||||
class CompilerCommand : BaseCommand() {
|
class CompilerCommand : BaseCommand() {
|
||||||
@@ -28,7 +27,7 @@ class CompilerCommand : BaseCommand() {
|
|||||||
private val kotlinCompilerServer = "https://api.kotlinlang.org/api/2.0.20/compiler/run"
|
private val kotlinCompilerServer = "https://api.kotlinlang.org/api/2.0.20/compiler/run"
|
||||||
private val glotCompilerServer = "https://glot.io/run"
|
private val glotCompilerServer = "https://glot.io/run"
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("使用`/exec` <语言> <代码> 即可执行~")
|
message.reply("使用`/exec` <语言> <代码> 即可执行~")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ package cn.rtast.fancybot.commands.misc
|
|||||||
import cn.rtast.fancybot.annotations.CommandDescription
|
import cn.rtast.fancybot.annotations.CommandDescription
|
||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import java.time.LocalDate
|
import java.time.LocalDate
|
||||||
import java.time.temporal.ChronoUnit
|
import java.time.temporal.ChronoUnit
|
||||||
|
|
||||||
@@ -18,7 +17,7 @@ import java.time.temporal.ChronoUnit
|
|||||||
class GaoKaoDaysRemainCommand : BaseCommand() {
|
class GaoKaoDaysRemainCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("高考倒计时")
|
override val commandNames = listOf("高考倒计时")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val gaoKaoDate = LocalDate.of(LocalDate.now().year, 6, 7)
|
val gaoKaoDate = LocalDate.of(LocalDate.now().year, 6, 7)
|
||||||
val currentDate = LocalDate.now()
|
val currentDate = LocalDate.now()
|
||||||
val adjustedGaoKaoDate = if (currentDate.isAfter(gaoKaoDate)) gaoKaoDate.plusYears(1) else gaoKaoDate
|
val adjustedGaoKaoDate = if (currentDate.isAfter(gaoKaoDate)) gaoKaoDate.plusYears(1) else gaoKaoDate
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import cn.rtast.fancybot.util.str.encodeToBase64
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("随机HTTP猫猫")
|
@CommandDescription("随机HTTP猫猫")
|
||||||
class HTTPCatCommand : BaseCommand() {
|
class HTTPCatCommand : BaseCommand() {
|
||||||
@@ -26,7 +25,7 @@ class HTTPCatCommand : BaseCommand() {
|
|||||||
return Resources.loadFromResourcesAsBytes("httpcat/${code}.jpg")?.encodeToBase64() ?: notFoundCatBase64
|
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 statusCode = if (args.isEmpty()) HttpStatusCode.entries.random().code.toString() else args.first()
|
||||||
val image = loadHTTPCat(statusCode)
|
val image = loadHTTPCat(statusCode)
|
||||||
val msg = MessageChain.Builder().addImage(image, true).build()
|
val msg = MessageChain.Builder().addImage(image, true).build()
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import cn.rtast.fancybot.util.str.encodeToBase64
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("随机HTTP狗狗")
|
@CommandDescription("随机HTTP狗狗")
|
||||||
class HTTPDogCommand : BaseCommand() {
|
class HTTPDogCommand : BaseCommand() {
|
||||||
@@ -26,7 +25,7 @@ class HTTPDogCommand : BaseCommand() {
|
|||||||
return Resources.loadFromResourcesAsBytes("httpdog/${code}.jpg")?.encodeToBase64() ?: notFoundCatBase64
|
return Resources.loadFromResourcesAsBytes("httpdog/${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 statusCode = if (args.isEmpty()) HttpStatusCode.entries.random().code.toString() else args.first()
|
||||||
val image = loadHTTPDog(statusCode)
|
val image = loadHTTPDog(statusCode)
|
||||||
val msg = MessageChain.Builder().addImage(image, true).build()
|
val msg = MessageChain.Builder().addImage(image, true).build()
|
||||||
|
|||||||
@@ -13,13 +13,12 @@ import cn.rtast.fancybot.util.Http
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("一言")
|
@CommandDescription("一言")
|
||||||
class HitokotoCommand : BaseCommand() {
|
class HitokotoCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("/1")
|
override val commandNames = listOf("/1")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val response = Http.get<Hitokoto>("https://v1.hitokoto.cn/?c=b")
|
val response = Http.get<Hitokoto>("https://v1.hitokoto.cn/?c=b")
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("⌊${response.sentence}⌉ ---《${response.from}》")
|
.addText("⌊${response.sentence}⌉ ---《${response.from}》")
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import cn.rtast.fancybot.util.file.JrrpManager
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("今日人品~")
|
@CommandDescription("今日人品~")
|
||||||
class JrrpCommand : BaseCommand() {
|
class JrrpCommand : BaseCommand() {
|
||||||
@@ -20,7 +19,7 @@ class JrrpCommand : BaseCommand() {
|
|||||||
|
|
||||||
private val jrrpManager = JrrpManager()
|
private val jrrpManager = JrrpManager()
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (jrrpManager.isJrrped(message.sender.userId)) {
|
if (jrrpManager.isJrrped(message.sender.userId)) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addAt(message.sender.userId)
|
.addAt(message.sender.userId)
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import com.madgag.gif.fmsware.GifDecoder
|
import com.madgag.gif.fmsware.GifDecoder
|
||||||
import java.awt.image.BufferedImage
|
import java.awt.image.BufferedImage
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
@@ -59,7 +58,7 @@ class JueCommand : BaseCommand() {
|
|||||||
return gif
|
return gif
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val target = message.message.find { it.type == ArrayMessageType.at }?.data?.qq.toString()
|
val target = message.message.find { it.type == ArrayMessageType.at }?.data?.qq.toString()
|
||||||
val source = message.sender.userId.toString()
|
val source = message.sender.userId.toString()
|
||||||
val gif = this.createJueGIF(source, target)
|
val gif = this.createJueGIF(source, target)
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import cn.rtast.fancybot.entity.KFC
|
|||||||
import cn.rtast.fancybot.util.Http
|
import cn.rtast.fancybot.util.Http
|
||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import java.time.DayOfWeek
|
import java.time.DayOfWeek
|
||||||
import java.time.Instant
|
import java.time.Instant
|
||||||
import java.time.LocalDateTime
|
import java.time.LocalDateTime
|
||||||
@@ -32,7 +31,7 @@ class KFCCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (!isThursday()) {
|
if (!isThursday()) {
|
||||||
message.reply("很可惜今天并不是星期四~")
|
message.reply("很可惜今天并不是星期四~")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.entity.PrivateMessage
|
import cn.rtast.rob.entity.PrivateMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import cn.rtast.rob.util.ob.asMessageChain
|
import cn.rtast.rob.util.ob.asMessageChain
|
||||||
import cn.rtast.rob.util.ob.asNode
|
import cn.rtast.rob.util.ob.asNode
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
@@ -70,7 +69,7 @@ class MCVersionCommand : BaseCommand() {
|
|||||||
|
|
||||||
private val javaEditionAPI = "https://launchermeta.mojang.com/mc/game/version_manifest.json"
|
private val javaEditionAPI = "https://launchermeta.mojang.com/mc/game/version_manifest.json"
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val mcVersion = Http.get<MCVersion>(javaEditionAPI)
|
val mcVersion = Http.get<MCVersion>(javaEditionAPI)
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("最新正式版: ${mcVersion.latest.release}")
|
.addText("最新正式版: ${mcVersion.latest.release}")
|
||||||
@@ -92,7 +91,7 @@ class MinecraftWikiCommand : BaseCommand() {
|
|||||||
private val baseApiUrl = "https://zh.minecraft.wiki/rest.php/v1"
|
private val baseApiUrl = "https://zh.minecraft.wiki/rest.php/v1"
|
||||||
private val logger = Logger.getLogger<MinecraftWikiCommand>()
|
private val logger = Logger.getLogger<MinecraftWikiCommand>()
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val action = args.first()
|
val action = args.first()
|
||||||
when (action) {
|
when (action) {
|
||||||
"s", "搜索" -> {
|
"s", "搜索" -> {
|
||||||
@@ -178,7 +177,7 @@ class SlimeChunkHelperCommand : BaseCommand() {
|
|||||||
private fun findMaxSlimeChunks(
|
private fun findMaxSlimeChunks(
|
||||||
worldSeed: Long,
|
worldSeed: Long,
|
||||||
searchRange: Int,
|
searchRange: Int,
|
||||||
chunkSize: Int
|
chunkSize: Int,
|
||||||
): Pair<Pair<Pair<Int, Int>, Pair<Int, Int>>, Int> {
|
): Pair<Pair<Pair<Int, Int>, Pair<Int, Int>>, Int> {
|
||||||
var maxCount = 0
|
var maxCount = 0
|
||||||
var bestStartLocation = Pair(0, 0)
|
var bestStartLocation = Pair(0, 0)
|
||||||
@@ -221,7 +220,7 @@ class SlimeChunkHelperCommand : BaseCommand() {
|
|||||||
return image.toByteArray().encodeToBase64()
|
return image.toByteArray().encodeToBase64()
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("此指令可以借助一个种子来帮助查找最适合史莱姆农场的位置")
|
.addText("此指令可以借助一个种子来帮助查找最适合史莱姆农场的位置")
|
||||||
@@ -299,7 +298,7 @@ class MCSkinCommand : BaseCommand() {
|
|||||||
return zoom.toByteArray().encodeToBase64()
|
return zoom.toByteArray().encodeToBase64()
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`/skin <uuid/游戏名称>`即可查询他的皮肤~ (仅限Java版)")
|
message.reply("发送`/skin <uuid/游戏名称>`即可查询他的皮肤~ (仅限Java版)")
|
||||||
return
|
return
|
||||||
@@ -332,7 +331,7 @@ class MCPingCommand : BaseCommand() {
|
|||||||
return this.replace(Regex("§."), "")
|
return this.replace(Regex("§."), "")
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("使用方法: /mcping <host>:[port] [java|be]")
|
.addText("使用方法: /mcping <host>:[port] [java|be]")
|
||||||
@@ -459,7 +458,7 @@ class MCLoginCommand : BaseCommand() {
|
|||||||
return response.token
|
return response.token
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("这个命令可以获取你的MC登录Token发送 `/mclogin login`进行操作吧")
|
message.reply("这个命令可以获取你的MC登录Token发送 `/mclogin login`进行操作吧")
|
||||||
return
|
return
|
||||||
@@ -500,7 +499,7 @@ class MCLoginCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executePrivate(listener: OneBotListener, message: PrivateMessage, args: List<String>) {
|
override suspend fun executePrivate(message: PrivateMessage, args: List<String>) {
|
||||||
val token = getAccessTokenById(message.sender.userId)
|
val token = getAccessTokenById(message.sender.userId)
|
||||||
if (token == null) {
|
if (token == null) {
|
||||||
message.reply("你还没登录呢!")
|
message.reply("你还没登录呢!")
|
||||||
@@ -522,11 +521,11 @@ class MCLoginCommand : BaseCommand() {
|
|||||||
class RCONCommand : BaseCommand() {
|
class RCONCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("/rcon", "/r")
|
override val commandNames = listOf("/rcon", "/r")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
message.reply("请在私聊中使用此命令")
|
message.reply("请在私聊中使用此命令")
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executePrivate(listener: OneBotListener, message: PrivateMessage, args: List<String>) {
|
override suspend fun executePrivate(message: PrivateMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("这条指令用于在群内操作mc服务器")
|
.addText("这条指令用于在群内操作mc服务器")
|
||||||
@@ -616,7 +615,7 @@ class MCBotCommand : BaseCommand() {
|
|||||||
return response.players.max to response.players.online
|
return response.players.max to response.players.online
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val clients = mutableListOf<MCClient>()
|
val clients = mutableListOf<MCClient>()
|
||||||
val action = args.first()
|
val action = args.first()
|
||||||
when (action) {
|
when (action) {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import cn.rtast.fancybot.util.file.insertActionRecord
|
|||||||
import cn.rtast.fancybot.util.str.toJson
|
import cn.rtast.fancybot.util.str.toJson
|
||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("Pastebin!")
|
@CommandDescription("Pastebin!")
|
||||||
class PastebinCommand : BaseCommand() {
|
class PastebinCommand : BaseCommand() {
|
||||||
@@ -36,7 +35,7 @@ class PastebinCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("使用`/pb <内容>`或者回复一个消息`/pb`可以快速创建一个pastebin")
|
message.reply("使用`/pb <内容>`或者回复一个消息`/pb`可以快速创建一个pastebin")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import com.google.zxing.BarcodeFormat
|
import com.google.zxing.BarcodeFormat
|
||||||
import com.google.zxing.BinaryBitmap
|
import com.google.zxing.BinaryBitmap
|
||||||
import com.google.zxing.EncodeHintType
|
import com.google.zxing.EncodeHintType
|
||||||
@@ -40,7 +39,7 @@ class GenerateQRCodeCommand : BaseCommand() {
|
|||||||
return MatrixToImageWriter.toBufferedImage(bitMatrix).toByteArray().encodeToBase64()
|
return MatrixToImageWriter.toBufferedImage(bitMatrix).toByteArray().encodeToBase64()
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`/qr <内容>`即可生成一张二维码的图片")
|
message.reply("发送`/qr <内容>`即可生成一张二维码的图片")
|
||||||
return
|
return
|
||||||
@@ -85,7 +84,7 @@ class ScanQRCodeCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (message.sender() !in waitingList) {
|
if (message.sender() !in waitingList) {
|
||||||
waitingList.add(message.sender())
|
waitingList.add(message.sender())
|
||||||
message.reply("继续发送一张二维码图片")
|
message.reply("继续发送一张二维码图片")
|
||||||
|
|||||||
@@ -12,13 +12,12 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("RUA!")
|
@CommandDescription("RUA!")
|
||||||
class RUACommand : BaseCommand() {
|
class RUACommand : BaseCommand() {
|
||||||
override val commandNames = listOf("/rua", "rua")
|
override val commandNames = listOf("/rua", "rua")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addAt(message.sender.userId)
|
.addAt(message.sender.userId)
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.enums.MusicShareType
|
import cn.rtast.rob.enums.MusicShareType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("获取随机热榜音乐(网易云)")
|
@CommandDescription("获取随机热榜音乐(网易云)")
|
||||||
class RandomMusicCommand : BaseCommand() {
|
class RandomMusicCommand : BaseCommand() {
|
||||||
@@ -23,7 +22,7 @@ class RandomMusicCommand : BaseCommand() {
|
|||||||
|
|
||||||
private val ncmApiUrl = "${configManager.ncmAPI}/top/song"
|
private val ncmApiUrl = "${configManager.ncmAPI}/top/song"
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val id = Http.get<TopSong>(ncmApiUrl).data.random().privilege.id
|
val id = Http.get<TopSong>(ncmApiUrl).data.random().privilege.id
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addMusicShare(MusicShareType.Netease, id.toString())
|
.addMusicShare(MusicShareType.Netease, id.toString())
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.enums.QQFace
|
import cn.rtast.rob.enums.QQFace
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.OneBotAction
|
import cn.rtast.rob.util.ob.OneBotAction
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("让你的消息得到回应(reaction)!")
|
@CommandDescription("让你的消息得到回应(reaction)!")
|
||||||
class ReactionCommand : BaseCommand() {
|
class ReactionCommand : BaseCommand() {
|
||||||
@@ -24,6 +23,6 @@ class ReactionCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) =
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) =
|
||||||
reaction(message.action, message.groupId, message.messageId)
|
reaction(message.action, message.groupId, message.messageId)
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,6 @@ import cn.rtast.fancybot.util.misc.randomBooleanWithProbability
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("人生重开模拟器")
|
@CommandDescription("人生重开模拟器")
|
||||||
class RemakeCommand : BaseCommand() {
|
class RemakeCommand : BaseCommand() {
|
||||||
@@ -30,7 +29,7 @@ class RemakeCommand : BaseCommand() {
|
|||||||
"鸽子", "鼠鼠", "化石", "狗狗"
|
"鸽子", "鼠鼠", "化石", "狗狗"
|
||||||
)
|
)
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val isSuccess = randomBooleanWithProbability(0.7)
|
val isSuccess = randomBooleanWithProbability(0.7)
|
||||||
val msg = MessageChain.Builder().addReply(message.messageId)
|
val msg = MessageChain.Builder().addReply(message.messageId)
|
||||||
if (isSuccess) {
|
if (isSuccess) {
|
||||||
|
|||||||
@@ -11,16 +11,14 @@ import cn.rtast.fancybot.annotations.CommandDescription
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("资料卡点赞")
|
@CommandDescription("资料卡点赞")
|
||||||
class SendLikeCommand : BaseCommand() {
|
class SendLikeCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("赞我")
|
override val commandNames = listOf("赞我")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
message.action.sendLike(message.sender.userId, 10)
|
message.action.sendLike(message.sender.userId, 10)
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addReply(message.messageId)
|
|
||||||
.addText("👍了你十下~~😁")
|
.addText("👍了你十下~~😁")
|
||||||
.build()
|
.build()
|
||||||
message.reply(msg)
|
message.reply(msg)
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import cn.rtast.fancybot.enums.CommandAction
|
|||||||
import cn.rtast.fancybot.util.file.insertActionRecord
|
import cn.rtast.fancybot.util.file.insertActionRecord
|
||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import org.simplejavamail.api.mailer.config.TransportStrategy
|
import org.simplejavamail.api.mailer.config.TransportStrategy
|
||||||
import org.simplejavamail.email.EmailBuilder
|
import org.simplejavamail.email.EmailBuilder
|
||||||
import org.simplejavamail.mailer.MailerBuilder
|
import org.simplejavamail.mailer.MailerBuilder
|
||||||
@@ -43,7 +42,7 @@ class SendMailCommand : BaseCommand() {
|
|||||||
this.mailer.sendMail(email)
|
this.mailer.sendMail(email)
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`/mail <收件人地址>`即可发送测试邮件~")
|
message.reply("发送`/mail <收件人地址>`即可发送测试邮件~")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import cn.rtast.fancybot.util.Http
|
|||||||
import cn.rtast.fancybot.util.str.toJson
|
import cn.rtast.fancybot.util.str.toJson
|
||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("生成短链接")
|
@CommandDescription("生成短链接")
|
||||||
class ShortLinkCommand : BaseCommand() {
|
class ShortLinkCommand : BaseCommand() {
|
||||||
@@ -34,7 +33,7 @@ class ShortLinkCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`/s <url>`来生成短链接`不要放入一些奇怪的链接哦~")
|
message.reply("发送`/s <url>`来生成短链接`不要放入一些奇怪的链接哦~")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import cn.rtast.fancybot.util.str.proxy
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
|
|
||||||
@CommandDescription("将文字转换成语音(TTS)!")
|
@CommandDescription("将文字转换成语音(TTS)!")
|
||||||
@@ -23,7 +22,7 @@ class TTSCommand : BaseCommand() {
|
|||||||
|
|
||||||
private val ttsApiUrl = "https://ttsmp3.com/makemp3_new.php"
|
private val ttsApiUrl = "https://ttsmp3.com/makemp3_new.php"
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`/tts <文字>`就可以生成语音啦~")
|
message.reply("发送`/tts <文字>`就可以生成语音啦~")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -11,14 +11,13 @@ import cn.rtast.fancybot.annotations.CommandDescription
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@Deprecated("已迁移到兑换列表中")
|
@Deprecated("已迁移到兑换列表中")
|
||||||
@CommandDescription("获得十张色图!")
|
@CommandDescription("获得十张色图!")
|
||||||
class TenSetuCommand : BaseCommand() {
|
class TenSetuCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("十张色图")
|
override val commandNames = listOf("十张色图")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("指令已经迁移到兑换列表中")
|
.addText("指令已经迁移到兑换列表中")
|
||||||
.addNewLine()
|
.addNewLine()
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ package cn.rtast.fancybot.commands.misc
|
|||||||
import cn.rtast.fancybot.annotations.CommandDescription
|
import cn.rtast.fancybot.annotations.CommandDescription
|
||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import kotlin.random.Random
|
import kotlin.random.Random
|
||||||
|
|
||||||
@CommandDescription("今天吃什么")
|
@CommandDescription("今天吃什么")
|
||||||
@@ -25,7 +24,7 @@ class TodayEatCommand : BaseCommand() {
|
|||||||
"酸辣粉", "煲仔饭", "⑩", "史"
|
"酸辣粉", "煲仔饭", "⑩", "史"
|
||||||
)
|
)
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (KFCCommand.isThursday() && Random.nextBoolean()) {
|
if (KFCCommand.isThursday() && Random.nextBoolean()) {
|
||||||
message.reply("今天是疯! 狂! 星! 期! 四!, 所以吃肯德基!")
|
message.reply("今天是疯! 狂! 星! 期! 四!, 所以吃肯德基!")
|
||||||
return
|
return
|
||||||
@@ -38,7 +37,7 @@ class TodayEatCommand : BaseCommand() {
|
|||||||
class TodayDontEatCommand : BaseCommand() {
|
class TodayDontEatCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("今天不吃什么")
|
override val commandNames = listOf("今天不吃什么")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
message.reply("你吃个结巴, 是吧")
|
message.reply("你吃个结巴, 是吧")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,7 +53,7 @@ class TodayDrinkCommand : BaseCommand() {
|
|||||||
"气泡水", "奶盖茶", "冰可乐", "草莓汁", "芒果汁", "蓝莓汁", "热奶茶", "蜂蜜柚子茶"
|
"气泡水", "奶盖茶", "冰可乐", "草莓汁", "芒果汁", "蓝莓汁", "热奶茶", "蜂蜜柚子茶"
|
||||||
)
|
)
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
message.reply("今天喝${drinkList.random()}吧~")
|
message.reply("今天喝${drinkList.random()}吧~")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -63,7 +62,7 @@ class TodayDrinkCommand : BaseCommand() {
|
|||||||
class TodayDontDrinkCommand : BaseCommand() {
|
class TodayDontDrinkCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("今天不喝什么")
|
override val commandNames = listOf("今天不喝什么")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
message.reply("你喝个结巴, 是吧")
|
message.reply("你喝个结巴, 是吧")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,6 @@ import cn.rtast.fancybot.util.str.encodeToBase64
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("将人类的语言翻译成尊嘟假嘟语还能将尊嘟假嘟语翻译成人类的语言!")
|
@CommandDescription("将人类的语言翻译成尊嘟假嘟语还能将尊嘟假嘟语翻译成人类的语言!")
|
||||||
class ZDJDCommand : BaseCommand() {
|
class ZDJDCommand : BaseCommand() {
|
||||||
@@ -78,7 +77,7 @@ class ZDJDCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val text = if (message.message.any { it.type == ArrayMessageType.image }) {
|
val text = if (message.message.any { it.type == ArrayMessageType.image }) {
|
||||||
message.message.find { it.type == ArrayMessageType.image }!!.data.file!!
|
message.message.find { it.type == ArrayMessageType.image }!!.data.file!!
|
||||||
} else args.joinToString(" ")
|
} else args.joinToString(" ")
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.entity.PrivateMessage
|
import cn.rtast.rob.entity.PrivateMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
val users = mutableMapOf<Long, Long>()
|
val users = mutableMapOf<Long, Long>()
|
||||||
|
|
||||||
@@ -20,7 +19,7 @@ val users = mutableMapOf<Long, Long>()
|
|||||||
class ZiBiCommand : BaseCommand() {
|
class ZiBiCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("/自闭", "自闭")
|
override val commandNames = listOf("/自闭", "自闭")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
try {
|
try {
|
||||||
users.remove(message.sender.userId)
|
users.remove(message.sender.userId)
|
||||||
val duration = if (args.isEmpty()) 1 else args.first().toInt()
|
val duration = if (args.isEmpty()) 1 else args.first().toInt()
|
||||||
@@ -47,7 +46,7 @@ class ZiBiCommand : BaseCommand() {
|
|||||||
class UnsetZiBiCommand : BaseCommand() {
|
class UnsetZiBiCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("我想开了")
|
override val commandNames = listOf("我想开了")
|
||||||
|
|
||||||
override suspend fun executePrivate(listener: OneBotListener, message: PrivateMessage, args: List<String>) {
|
override suspend fun executePrivate(message: PrivateMessage, args: List<String>) {
|
||||||
if (!users.any { it.key == message.sender.userId }) {
|
if (!users.any { it.key == message.sender.userId }) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("你没有在自闭列表中~")
|
.addText("你没有在自闭列表中~")
|
||||||
|
|||||||
@@ -12,14 +12,13 @@ import cn.rtast.fancybot.niuziManager
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
|
|
||||||
@CommandDescription("查询自己牛子的长度")
|
@CommandDescription("查询自己牛子的长度")
|
||||||
class MyNiuziCommand : BaseCommand() {
|
class MyNiuziCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("我的牛子", "mp")
|
override val commandNames = listOf("我的牛子", "mp")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val niuzi = niuziManager.getUser(message.sender.userId)
|
val niuzi = niuziManager.getUser(message.sender.userId)
|
||||||
if (niuzi == null) {
|
if (niuzi == null) {
|
||||||
message.reply("你还没有牛子呢, 发送`牛子签到`来领取一根专属于你的牛子吧~")
|
message.reply("你还没有牛子呢, 发送`牛子签到`来领取一根专属于你的牛子吧~")
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
private suspend fun noAccount(message: GroupMessage) {
|
private suspend fun noAccount(message: GroupMessage) {
|
||||||
message.reply("你还没有银行账户呢, 发送`创建账户`来创建一个账户吧~")
|
message.reply("你还没有银行账户呢, 发送`创建账户`来创建一个账户吧~")
|
||||||
@@ -28,7 +27,7 @@ private const val INTEREST_RATE = 0.0054
|
|||||||
class NiuziBankCommand : BaseCommand() {
|
class NiuziBankCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("牛子银行")
|
override val commandNames = listOf("牛子银行")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val niuziCommands = commands.filter {
|
val niuziCommands = commands.filter {
|
||||||
it::class.simpleName?.startsWith("Niuzi")!! && !it::class.simpleName?.lowercase()?.contains("redeem")!!
|
it::class.simpleName?.startsWith("Niuzi")!! && !it::class.simpleName?.lowercase()?.contains("redeem")!!
|
||||||
}.joinToString("\n") { it.commandNames.joinToString(",") { join -> "`$join`" } }
|
}.joinToString("\n") { it.commandNames.joinToString(",") { join -> "`$join`" } }
|
||||||
@@ -49,7 +48,7 @@ class NiuziBankCommand : BaseCommand() {
|
|||||||
class BankBalanceCommand : BaseCommand() {
|
class BankBalanceCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("余额查询")
|
override val commandNames = listOf("余额查询")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val balanceData = niuziBankManager.getUser(message.sender.userId)
|
val balanceData = niuziBankManager.getUser(message.sender.userId)
|
||||||
if (balanceData == null) {
|
if (balanceData == null) {
|
||||||
noAccount(message)
|
noAccount(message)
|
||||||
@@ -63,7 +62,7 @@ class BankBalanceCommand : BaseCommand() {
|
|||||||
class CreateBankAccountCommand : BaseCommand() {
|
class CreateBankAccountCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("创建账户")
|
override val commandNames = listOf("创建账户")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (niuziBankManager.getUser(message.sender.userId) != null) {
|
if (niuziBankManager.getUser(message.sender.userId) != null) {
|
||||||
message.reply("你已经有账户了!")
|
message.reply("你已经有账户了!")
|
||||||
return
|
return
|
||||||
@@ -78,7 +77,7 @@ class CreateBankAccountCommand : BaseCommand() {
|
|||||||
class BankTransferCommand : BaseCommand() {
|
class BankTransferCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("银行转账")
|
override val commandNames = listOf("银行转账")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val currentUserBalance = niuziBankManager.getUser(message.sender.userId)
|
val currentUserBalance = niuziBankManager.getUser(message.sender.userId)
|
||||||
if (currentUserBalance == null) {
|
if (currentUserBalance == null) {
|
||||||
noAccount(message)
|
noAccount(message)
|
||||||
@@ -94,7 +93,7 @@ class BankTransferCommand : BaseCommand() {
|
|||||||
message.reply("你的牛子长度不够转账!")
|
message.reply("你的牛子长度不够转账!")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val username = listener.getUserName(message.action, message.groupId, message.sender.userId)
|
val username = message.action.getUserName(message.groupId, message.sender.userId)
|
||||||
val result = niuziBankManager.transfer(message.sender.userId, target, amount, username)
|
val result = niuziBankManager.transfer(message.sender.userId, target, amount, username)
|
||||||
message.reply("转账成功! 你在银行内剩余的牛子长度为: ${result?.balance}")
|
message.reply("转账成功! 你在银行内剩余的牛子长度为: ${result?.balance}")
|
||||||
}
|
}
|
||||||
@@ -104,7 +103,7 @@ class BankTransferCommand : BaseCommand() {
|
|||||||
class WithdrawCommand : BaseCommand() {
|
class WithdrawCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("取牛子")
|
override val commandNames = listOf("取牛子")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val amount = args.last().toDouble()
|
val amount = args.last().toDouble()
|
||||||
val currentBalance = niuziBankManager.getUser(message.sender.userId)
|
val currentBalance = niuziBankManager.getUser(message.sender.userId)
|
||||||
val niuzi = niuziManager.getUser(message.sender.userId)
|
val niuzi = niuziManager.getUser(message.sender.userId)
|
||||||
@@ -124,7 +123,7 @@ class WithdrawCommand : BaseCommand() {
|
|||||||
message.reply("取出的长度必须大于0!")
|
message.reply("取出的长度必须大于0!")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val username = listener.getUserName(message.action, message.groupId, message.sender.userId)
|
val username = message.action.getUserName(message.groupId, message.sender.userId)
|
||||||
val result = niuziBankManager.withdraw(message.sender.userId, amount, username)
|
val result = niuziBankManager.withdraw(message.sender.userId, amount, username)
|
||||||
niuziManager.updateLength(message.sender.userId, amount + amount * INTEREST_RATE)
|
niuziManager.updateLength(message.sender.userId, amount + amount * INTEREST_RATE)
|
||||||
message.reply("取牛子成功, 你现在还剩${result.balance}cm的牛子在银行内")
|
message.reply("取牛子成功, 你现在还剩${result.balance}cm的牛子在银行内")
|
||||||
@@ -135,7 +134,7 @@ class WithdrawCommand : BaseCommand() {
|
|||||||
class DepositCommand : BaseCommand() {
|
class DepositCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("存牛子")
|
override val commandNames = listOf("存牛子")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val currentBalance = niuziBankManager.getUser(message.sender.userId)
|
val currentBalance = niuziBankManager.getUser(message.sender.userId)
|
||||||
val niuzi = niuziManager.getUser(message.sender.userId)
|
val niuzi = niuziManager.getUser(message.sender.userId)
|
||||||
val amount = args.last().toDouble()
|
val amount = args.last().toDouble()
|
||||||
@@ -155,7 +154,7 @@ class DepositCommand : BaseCommand() {
|
|||||||
message.reply("你身上的牛子不够用啦, 没办法存进银行! >>> ${niuzi.length}")
|
message.reply("你身上的牛子不够用啦, 没办法存进银行! >>> ${niuzi.length}")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val username = listener.getUserName(message.action, message.groupId, message.sender.userId)
|
val username = message.action.getUserName(message.groupId, message.sender.userId)
|
||||||
val self = niuziManager.updateLength(message.sender.userId, -amount)
|
val self = niuziManager.updateLength(message.sender.userId, -amount)
|
||||||
val result = niuziBankManager.deposit(message.sender.userId, amount, username)
|
val result = niuziBankManager.deposit(message.sender.userId, amount, username)
|
||||||
message.reply("存入成功你身上的牛子还有${self?.length}cm 银行账户内还有: ${result.balance}cm")
|
message.reply("存入成功你身上的牛子还有${self?.length}cm 银行账户内还有: ${result.balance}cm")
|
||||||
|
|||||||
@@ -13,13 +13,12 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("来一起激情击剑吧!")
|
@CommandDescription("来一起激情击剑吧!")
|
||||||
class NiuziJiJianCommand : BaseCommand() {
|
class NiuziJiJianCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("击剑", "jj")
|
override val commandNames = listOf("击剑", "jj")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`击剑 @xxx`即可对某人进行击剑")
|
message.reply("发送`击剑 @xxx`即可对某人进行击剑")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -15,13 +15,12 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("在群内设置某个成员的牛子银行余额或者现金牛子长度")
|
@CommandDescription("在群内设置某个成员的牛子银行余额或者现金牛子长度")
|
||||||
class NiuziManagerCommand : BaseCommand() {
|
class NiuziManagerCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("管理牛子")
|
override val commandNames = listOf("管理牛子")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("此命令可以管理成员的牛子或者银行账户")
|
message.reply("此命令可以管理成员的牛子或者银行账户")
|
||||||
return
|
return
|
||||||
@@ -37,7 +36,7 @@ class NiuziManagerCommand : BaseCommand() {
|
|||||||
"yh", "银行" -> {
|
"yh", "银行" -> {
|
||||||
val before = niuziBankManager.getUser(target)
|
val before = niuziBankManager.getUser(target)
|
||||||
niuziBankManager.deposit(
|
niuziBankManager.deposit(
|
||||||
target, amount, listener.getUserName(message.action, message.groupId, target)
|
target, amount, message.action.getUserName(message.groupId, target)
|
||||||
)
|
)
|
||||||
val after = niuziBankManager.getUser(target)
|
val after = niuziBankManager.getUser(target)
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
|
|||||||
@@ -12,13 +12,12 @@ import cn.rtast.fancybot.niuziManager
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("查询别人的牛子长度")
|
@CommandDescription("查询别人的牛子长度")
|
||||||
class NiuziQueryCommand : BaseCommand() {
|
class NiuziQueryCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("牛子查询")
|
override val commandNames = listOf("牛子查询")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("输入`牛子查询 @某人`即可查询他的牛子长度")
|
message.reply("输入`牛子查询 @某人`即可查询他的牛子长度")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -13,13 +13,12 @@ import cn.rtast.fancybot.niuziManager
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("查询所有人的牛子的排行榜")
|
@CommandDescription("查询所有人的牛子的排行榜")
|
||||||
class NiuziRankCommand : BaseCommand() {
|
class NiuziRankCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("牛子排行榜", "牛子排行")
|
override val commandNames = listOf("牛子排行榜", "牛子排行")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val allNiuzi = niuziManager.getAllNiuzi().sortedBy { it.length }.reversed()
|
val allNiuzi = niuziManager.getAllNiuzi().sortedBy { it.length }.reversed()
|
||||||
val msg = MessageChain.Builder().addText("牛子长度排行榜如下").addNewLine()
|
val msg = MessageChain.Builder().addText("牛子长度排行榜如下").addNewLine()
|
||||||
allNiuzi.forEach {
|
allNiuzi.forEach {
|
||||||
@@ -33,7 +32,7 @@ class NiuziRankCommand : BaseCommand() {
|
|||||||
class NiuziBankRankCommand : BaseCommand() {
|
class NiuziBankRankCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("牛子富豪榜", "富豪榜")
|
override val commandNames = listOf("牛子富豪榜", "富豪榜")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
val allNiuziBankAccounts = niuziBankManager.getAllAccount()
|
val allNiuziBankAccounts = niuziBankManager.getAllAccount()
|
||||||
.sortedBy { it.balance }.reversed()
|
.sortedBy { it.balance }.reversed()
|
||||||
val msg = MessageChain.Builder().addText("牛子银行富豪榜排行如下").addNewLine()
|
val msg = MessageChain.Builder().addText("牛子银行富豪榜排行如下").addNewLine()
|
||||||
|
|||||||
@@ -13,13 +13,12 @@ import cn.rtast.fancybot.niuziManager
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("使用牛子长度兑换物品")
|
@CommandDescription("使用牛子长度兑换物品")
|
||||||
class NiuziRedeemCommand : BaseCommand() {
|
class NiuziRedeemCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("/rdm")
|
override val commandNames = listOf("/rdm")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("发送 /rdm <物品名称> 即可兑换哦!")
|
.addText("发送 /rdm <物品名称> 即可兑换哦!")
|
||||||
@@ -64,7 +63,7 @@ class NiuziRedeemCommand : BaseCommand() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
val afterStatus = niuziManager.redeemItem(message.sender.userId, selectedItemPrice)?.length!!
|
val afterStatus = niuziManager.redeemItem(message.sender.userId, selectedItemPrice)?.length!!
|
||||||
val action = selectedItem.redeemInGroup(listener, message, afterStatus)
|
val action = selectedItem.redeemInGroup(message, afterStatus)
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addText("兑换成功! 你花费了${selectedItemPrice}cm来兑换奖品, 还剩${afterStatus}cm")
|
.addText("兑换成功! 你花费了${selectedItemPrice}cm来兑换奖品, 还剩${afterStatus}cm")
|
||||||
.addNewLine()
|
.addNewLine()
|
||||||
|
|||||||
@@ -13,18 +13,17 @@ import cn.rtast.fancybot.util.misc.getUserName
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("牛子签到~")
|
@CommandDescription("牛子签到~")
|
||||||
class NiuziSignCommand : BaseCommand() {
|
class NiuziSignCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("牛子签到", "签到")
|
override val commandNames = listOf("牛子签到", "签到")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (niuziManager.isSigned(message.sender.userId)) {
|
if (niuziManager.isSigned(message.sender.userId)) {
|
||||||
message.reply("你今天已经对你的牛子使用了签到啦,明天再来吧~")
|
message.reply("你今天已经对你的牛子使用了签到啦,明天再来吧~")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val username = listener.getUserName(message.action, message.groupId, message.sender.userId)
|
val username = message.action.getUserName(message.groupId, message.sender.userId)
|
||||||
val afterStatus = niuziManager.sign(message.sender.userId, username)
|
val afterStatus = niuziManager.sign(message.sender.userId, username)
|
||||||
val msg = MessageChain.Builder()
|
val msg = MessageChain.Builder()
|
||||||
.addReply(message.messageId)
|
.addReply(message.messageId)
|
||||||
|
|||||||
@@ -12,13 +12,12 @@ import cn.rtast.fancybot.niuziManager
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
|
|
||||||
@CommandDescription("将自己的牛子长度转账给别人")
|
@CommandDescription("将自己的牛子长度转账给别人")
|
||||||
class NiuziTransferCommand : BaseCommand() {
|
class NiuziTransferCommand : BaseCommand() {
|
||||||
override val commandNames = listOf("牛子转账", "zz")
|
override val commandNames = listOf("牛子转账", "zz")
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (args.isEmpty()) {
|
if (args.isEmpty()) {
|
||||||
message.reply("发送`牛子转账 @某人 <长度>` 即可把自己的牛子长度转账给TA")
|
message.reply("发送`牛子转账 @某人 <长度>` 即可把自己的牛子长度转账给TA")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import cn.rtast.rob.util.ob.asMessageChain
|
import cn.rtast.rob.util.ob.asMessageChain
|
||||||
import com.madgag.gif.fmsware.GifDecoder
|
import com.madgag.gif.fmsware.GifDecoder
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
@@ -179,7 +178,7 @@ class AsciiArtCommand : BaseCommand() {
|
|||||||
private data class UnifiedMessage(val type: ArrayMessageType, val file: String?, val url: String?)
|
private data class UnifiedMessage(val type: ArrayMessageType, val file: String?, val url: String?)
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (message.sender.userId !in waitingList) {
|
if (message.sender.userId !in waitingList) {
|
||||||
message.reply("请继续发送一张图片, 如果输入错误则取消本次操作, 如果GIF帧数过多可能会需要很长时间(也可能处理失败)")
|
message.reply("请继续发送一张图片, 如果输入错误则取消本次操作, 如果GIF帧数过多可能会需要很长时间(也可能处理失败)")
|
||||||
waitingList.add(message.sender.userId)
|
waitingList.add(message.sender.userId)
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import cn.rtast.fancybot.util.str.setTruncate
|
|||||||
import cn.rtast.rob.entity.GroupMessage
|
import cn.rtast.rob.entity.GroupMessage
|
||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import java.awt.Color
|
import java.awt.Color
|
||||||
@@ -184,7 +183,7 @@ object BiliVideoParseCommand {
|
|||||||
return String(bytes)
|
return String(bytes)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun parse(listener: OneBotListener, message: GroupMessage) {
|
suspend fun parse(message: GroupMessage) {
|
||||||
try {
|
try {
|
||||||
val bvid = if (bvRegex.containsMatchIn(message.rawMessage)) {
|
val bvid = if (bvRegex.containsMatchIn(message.rawMessage)) {
|
||||||
message.rawMessage.extractBv()
|
message.rawMessage.extractBv()
|
||||||
@@ -275,7 +274,7 @@ object BiliUserParseCommand {
|
|||||||
return image.toByteArray().encodeToBase64()
|
return image.toByteArray().encodeToBase64()
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun parse(listener: OneBotListener, message: GroupMessage) {
|
suspend fun parse(message: GroupMessage) {
|
||||||
val match = idRegex.find(message.rawMessage)
|
val match = idRegex.find(message.rawMessage)
|
||||||
if (match != null) {
|
if (match != null) {
|
||||||
val userId = match.groupValues[1]
|
val userId = match.groupValues[1]
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import cn.rtast.rob.entity.GroupMessage
|
|||||||
import cn.rtast.rob.enums.ArrayMessageType
|
import cn.rtast.rob.enums.ArrayMessageType
|
||||||
import cn.rtast.rob.util.BaseCommand
|
import cn.rtast.rob.util.BaseCommand
|
||||||
import cn.rtast.rob.util.ob.MessageChain
|
import cn.rtast.rob.util.ob.MessageChain
|
||||||
import cn.rtast.rob.util.ob.OneBotListener
|
|
||||||
import com.madgag.gif.fmsware.GifDecoder
|
import com.madgag.gif.fmsware.GifDecoder
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
@@ -63,7 +62,7 @@ class ReverseGIFCommand : BaseCommand() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
override suspend fun executeGroup(message: GroupMessage, args: List<String>) {
|
||||||
if (message.sender.userId !in waitingList) {
|
if (message.sender.userId !in waitingList) {
|
||||||
message.reply("发送一张动图来继续操作")
|
message.reply("发送一张动图来继续操作")
|
||||||
waitingList.add(message.sender.userId)
|
waitingList.add(message.sender.userId)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ object MinecraftAccessTokenTable : Table("mc_access_token") {
|
|||||||
data class MCAccessTokenEntity(
|
data class MCAccessTokenEntity(
|
||||||
val token: String,
|
val token: String,
|
||||||
val userId: Long,
|
val userId: Long,
|
||||||
val timestamp: Long
|
val timestamp: Long,
|
||||||
)
|
)
|
||||||
|
|
||||||
suspend fun insertNewAccessToken(accessToken: String, id: Long) {
|
suspend fun insertNewAccessToken(accessToken: String, id: Long) {
|
||||||
|
|||||||
@@ -24,5 +24,5 @@ data class NiuziBankAccount(
|
|||||||
val balance: Double,
|
val balance: Double,
|
||||||
val interestRate: Double,
|
val interestRate: Double,
|
||||||
val timestamp: Long,
|
val timestamp: Long,
|
||||||
val nickname: String
|
val nickname: String,
|
||||||
)
|
)
|
||||||
@@ -24,6 +24,6 @@ data class RCONEntity(
|
|||||||
val port: Int,
|
val port: Int,
|
||||||
val userId: Long,
|
val userId: Long,
|
||||||
val name: String,
|
val name: String,
|
||||||
val password: String
|
val password: String,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -13,5 +13,5 @@ data class Hitokoto(
|
|||||||
val uuid: String,
|
val uuid: String,
|
||||||
@SerializedName("hitokoto")
|
@SerializedName("hitokoto")
|
||||||
val sentence: String,
|
val sentence: String,
|
||||||
val from: String
|
val from: String,
|
||||||
)
|
)
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
package cn.rtast.fancybot.entity.apispace
|
package cn.rtast.fancybot.entity.apispace
|
||||||
|
|
||||||
data class IdiomExplainResponse(
|
data class IdiomExplainResponse(
|
||||||
val data: List<Data>
|
val data: List<Data>,
|
||||||
) {
|
) {
|
||||||
data class Data(
|
data class Data(
|
||||||
val name: String,
|
val name: String,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ package cn.rtast.fancybot.entity.bgm
|
|||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
data class BGMSearch(
|
data class BGMSearch(
|
||||||
val list: List<Result>
|
val list: List<Result>,
|
||||||
) {
|
) {
|
||||||
data class Result(
|
data class Result(
|
||||||
val url: String,
|
val url: String,
|
||||||
@@ -21,6 +21,6 @@ data class BGMSearch(
|
|||||||
)
|
)
|
||||||
|
|
||||||
data class Images(
|
data class Images(
|
||||||
val large: String
|
val large: String,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ data class CardShare(
|
|||||||
data class Meta(
|
data class Meta(
|
||||||
@SerializedName("detail_1")
|
@SerializedName("detail_1")
|
||||||
val detail: Detail?,
|
val detail: Detail?,
|
||||||
val news: News?
|
val news: News?,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Detail(
|
data class Detail(
|
||||||
@@ -26,6 +26,6 @@ data class CardShare(
|
|||||||
|
|
||||||
data class News(
|
data class News(
|
||||||
val tag: String,
|
val tag: String,
|
||||||
val jumpUrl: String
|
val jumpUrl: String,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -8,9 +8,9 @@
|
|||||||
package cn.rtast.fancybot.entity.bili
|
package cn.rtast.fancybot.entity.bili
|
||||||
|
|
||||||
data class ShortUrl(
|
data class ShortUrl(
|
||||||
val data: Data
|
val data: Data,
|
||||||
) {
|
) {
|
||||||
data class Data(
|
data class Data(
|
||||||
val content: String
|
val content: String,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@ package cn.rtast.fancybot.entity.bili
|
|||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
data class UserInfo(
|
data class UserInfo(
|
||||||
val data: Data
|
val data: Data,
|
||||||
) {
|
) {
|
||||||
data class Data(
|
data class Data(
|
||||||
val card: Card,
|
val card: Card,
|
||||||
@@ -22,7 +22,7 @@ data class UserInfo(
|
|||||||
val fans: Int,
|
val fans: Int,
|
||||||
val sign: String,
|
val sign: String,
|
||||||
@SerializedName("level_info")
|
@SerializedName("level_info")
|
||||||
val levelInfo: LevelInfo
|
val levelInfo: LevelInfo,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class LevelInfo(
|
data class LevelInfo(
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
package cn.rtast.fancybot.entity.bili
|
package cn.rtast.fancybot.entity.bili
|
||||||
|
|
||||||
data class UserStat(
|
data class UserStat(
|
||||||
val data: Data
|
val data: Data,
|
||||||
) {
|
) {
|
||||||
data class Data(
|
data class Data(
|
||||||
val follower: Int
|
val follower: Int,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
package cn.rtast.fancybot.entity.bili
|
package cn.rtast.fancybot.entity.bili
|
||||||
|
|
||||||
data class VideoStat(
|
data class VideoStat(
|
||||||
val data: Data
|
val data: Data,
|
||||||
) {
|
) {
|
||||||
data class Data(
|
data class Data(
|
||||||
val aid: Long,
|
val aid: Long,
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
package cn.rtast.fancybot.entity.bili
|
package cn.rtast.fancybot.entity.bili
|
||||||
|
|
||||||
data class ViewCount(
|
data class ViewCount(
|
||||||
val data: Data
|
val data: Data,
|
||||||
) {
|
) {
|
||||||
data class Data(
|
data class Data(
|
||||||
val total: String
|
val total: String,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -4,5 +4,5 @@ data class BullShit(
|
|||||||
val after: List<String>,
|
val after: List<String>,
|
||||||
val before: List<String>,
|
val before: List<String>,
|
||||||
val bosh: List<String>,
|
val bosh: List<String>,
|
||||||
val famous: List<String>
|
val famous: List<String>,
|
||||||
)
|
)
|
||||||
@@ -13,7 +13,7 @@ data class Cigarette(
|
|||||||
@SerializedName("totalnum")
|
@SerializedName("totalnum")
|
||||||
val totalCount: Int,
|
val totalCount: Int,
|
||||||
@SerializedName("productlist")
|
@SerializedName("productlist")
|
||||||
val productList: List<Product>
|
val productList: List<Product>,
|
||||||
) {
|
) {
|
||||||
data class Product(
|
data class Product(
|
||||||
@SerializedName("productname")
|
@SerializedName("productname")
|
||||||
@@ -26,11 +26,11 @@ data class Cigarette(
|
|||||||
@SerializedName("packprice")
|
@SerializedName("packprice")
|
||||||
val packPrice: Float,
|
val packPrice: Float,
|
||||||
@SerializedName("barprice")
|
@SerializedName("barprice")
|
||||||
val barPrice: Float
|
val barPrice: Float,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class CigaretteType(
|
data class CigaretteType(
|
||||||
@SerializedName("typename")
|
@SerializedName("typename")
|
||||||
val typeName: String
|
val typeName: String,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -8,10 +8,10 @@
|
|||||||
package cn.rtast.fancybot.entity.compiler
|
package cn.rtast.fancybot.entity.compiler
|
||||||
|
|
||||||
data class GLOTPayload(
|
data class GLOTPayload(
|
||||||
val files: List<File>
|
val files: List<File>,
|
||||||
) {
|
) {
|
||||||
data class File(
|
data class File(
|
||||||
val content: String,
|
val content: String,
|
||||||
val name: String = "main"
|
val name: String = "main",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -10,11 +10,11 @@ package cn.rtast.fancybot.entity.compiler
|
|||||||
data class KCSPayload(
|
data class KCSPayload(
|
||||||
val files: List<File>,
|
val files: List<File>,
|
||||||
val args: String = "",
|
val args: String = "",
|
||||||
val confType: String = "java"
|
val confType: String = "java",
|
||||||
) {
|
) {
|
||||||
data class File(
|
data class File(
|
||||||
val text: String,
|
val text: String,
|
||||||
val name: String = "File.kt",
|
val name: String = "File.kt",
|
||||||
val publicId: String = ""
|
val publicId: String = "",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -13,10 +13,10 @@ data class KCSResponse(
|
|||||||
val errors: Errors,
|
val errors: Errors,
|
||||||
val exception: Any,
|
val exception: Any,
|
||||||
val jvmByteCode: Any,
|
val jvmByteCode: Any,
|
||||||
val text: String
|
val text: String,
|
||||||
) {
|
) {
|
||||||
data class Errors(
|
data class Errors(
|
||||||
@SerializedName("File.kt")
|
@SerializedName("File.kt")
|
||||||
val file: List<Any>
|
val file: List<Any>,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -24,5 +24,5 @@ data class PricePayload(
|
|||||||
@SerializedName("Version")
|
@SerializedName("Version")
|
||||||
val version: String = "2018-08-08",
|
val version: String = "2018-08-08",
|
||||||
@SerializedName("Action")
|
@SerializedName("Action")
|
||||||
val action: String = "BatchCheckDomain"
|
val action: String = "BatchCheckDomain",
|
||||||
)
|
)
|
||||||
@@ -10,16 +10,16 @@ package cn.rtast.fancybot.entity.domain
|
|||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
data class PriceResponse(
|
data class PriceResponse(
|
||||||
val data: Data
|
val data: Data,
|
||||||
) {
|
) {
|
||||||
data class Data(
|
data class Data(
|
||||||
@SerializedName("Response")
|
@SerializedName("Response")
|
||||||
val response: Response
|
val response: Response,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Response(
|
data class Response(
|
||||||
@SerializedName("DomainList")
|
@SerializedName("DomainList")
|
||||||
val domainList: List<Domain>
|
val domainList: List<Domain>,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Domain(
|
data class Domain(
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ package cn.rtast.fancybot.entity.douyin
|
|||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
data class DouyinVideo(
|
data class DouyinVideo(
|
||||||
val data: Data
|
val data: Data,
|
||||||
) {
|
) {
|
||||||
data class Data(
|
data class Data(
|
||||||
@SerializedName("aweme_detail")
|
@SerializedName("aweme_detail")
|
||||||
val awemeDetail: AwemeDetail
|
val awemeDetail: AwemeDetail,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class AwemeDetail(
|
data class AwemeDetail(
|
||||||
@@ -62,12 +62,12 @@ data class DouyinVideo(
|
|||||||
@SerializedName("cover_original_scale")
|
@SerializedName("cover_original_scale")
|
||||||
val coverOriginalScale: CoverOriginalScale,
|
val coverOriginalScale: CoverOriginalScale,
|
||||||
@SerializedName("bit_rate")
|
@SerializedName("bit_rate")
|
||||||
val bitRate: List<BitRate>
|
val bitRate: List<BitRate>,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class BitRate(
|
data class BitRate(
|
||||||
@SerializedName("play_addr")
|
@SerializedName("play_addr")
|
||||||
val playAddr: PlayAddr
|
val playAddr: PlayAddr,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class PlayAddr(
|
data class PlayAddr(
|
||||||
@@ -79,6 +79,6 @@ data class DouyinVideo(
|
|||||||
@SerializedName("url_list")
|
@SerializedName("url_list")
|
||||||
val urlList: List<String>,
|
val urlList: List<String>,
|
||||||
val height: Int,
|
val height: Int,
|
||||||
val width: Int
|
val width: Int,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -9,10 +9,10 @@ package cn.rtast.fancybot.entity.github
|
|||||||
|
|
||||||
data class LatestCommit(
|
data class LatestCommit(
|
||||||
val sha: String,
|
val sha: String,
|
||||||
val commit: Commit
|
val commit: Commit,
|
||||||
) {
|
) {
|
||||||
data class Commit(
|
data class Commit(
|
||||||
val committer: Committer
|
val committer: Committer,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Committer(
|
data class Committer(
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ data class RepoInfo(
|
|||||||
@SerializedName("open_issues_count")
|
@SerializedName("open_issues_count")
|
||||||
val openIssueCount: Int,
|
val openIssueCount: Int,
|
||||||
val fork: Boolean,
|
val fork: Boolean,
|
||||||
val parent: Parent?
|
val parent: Parent?,
|
||||||
) {
|
) {
|
||||||
data class Owner(
|
data class Owner(
|
||||||
@SerializedName("avatar_url")
|
@SerializedName("avatar_url")
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
package cn.rtast.fancybot.entity.github
|
package cn.rtast.fancybot.entity.github
|
||||||
|
|
||||||
data class UploadContentResponse(
|
data class UploadContentResponse(
|
||||||
val content: Content
|
val content: Content,
|
||||||
) {
|
) {
|
||||||
data class Content(
|
data class Content(
|
||||||
val name: String,
|
val name: String,
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ import cn.rtast.fancybot.enums.GPTUserRole
|
|||||||
data class ChatCompletionsPayload(
|
data class ChatCompletionsPayload(
|
||||||
val model: String,
|
val model: String,
|
||||||
val messages: List<Message>,
|
val messages: List<Message>,
|
||||||
val stream: Boolean = false
|
val stream: Boolean = false,
|
||||||
) {
|
) {
|
||||||
data class Message(
|
data class Message(
|
||||||
val content: String,
|
val content: String,
|
||||||
val role: GPTUserRole = GPTUserRole.user,
|
val role: GPTUserRole = GPTUserRole.user,
|
||||||
val temperature: Float = 0.3f
|
val temperature: Float = 0.3f,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -10,10 +10,10 @@ package cn.rtast.fancybot.entity.gpt
|
|||||||
import cn.rtast.fancybot.enums.GPTUserRole
|
import cn.rtast.fancybot.enums.GPTUserRole
|
||||||
|
|
||||||
data class ChatCompletionsResponse(
|
data class ChatCompletionsResponse(
|
||||||
val choices: List<Choice>
|
val choices: List<Choice>,
|
||||||
) {
|
) {
|
||||||
data class Choice(
|
data class Choice(
|
||||||
val message: Message
|
val message: Message,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Message(
|
data class Message(
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
package cn.rtast.fancybot.entity.gpt
|
package cn.rtast.fancybot.entity.gpt
|
||||||
|
|
||||||
data class LlamaResponse(
|
data class LlamaResponse(
|
||||||
val message: Message
|
val message: Message,
|
||||||
) {
|
) {
|
||||||
data class Message(
|
data class Message(
|
||||||
val content: String,
|
val content: String,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
package cn.rtast.fancybot.entity.gpt
|
package cn.rtast.fancybot.entity.gpt
|
||||||
|
|
||||||
data class ModelList(
|
data class ModelList(
|
||||||
val data: List<Data>
|
val data: List<Data>,
|
||||||
) {
|
) {
|
||||||
data class Data(
|
data class Data(
|
||||||
val id: String,
|
val id: String,
|
||||||
|
|||||||
@@ -11,16 +11,16 @@ import cn.rtast.fancybot.enums.mc.MCVersionType
|
|||||||
|
|
||||||
data class MCVersion(
|
data class MCVersion(
|
||||||
val latest: Latest,
|
val latest: Latest,
|
||||||
val versions: List<Version>
|
val versions: List<Version>,
|
||||||
) {
|
) {
|
||||||
data class Latest(
|
data class Latest(
|
||||||
val release: String,
|
val release: String,
|
||||||
val snapshot: String
|
val snapshot: String,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Version(
|
data class Version(
|
||||||
val id: String,
|
val id: String,
|
||||||
val type: MCVersionType,
|
val type: MCVersionType,
|
||||||
val releaseTime: String
|
val releaseTime: String,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,7 @@ data class MCWikiPageResponse(
|
|||||||
val title: String,
|
val title: String,
|
||||||
val latest: Latest,
|
val latest: Latest,
|
||||||
val source: String,
|
val source: String,
|
||||||
val license: License
|
val license: License,
|
||||||
) {
|
) {
|
||||||
data class Latest(
|
data class Latest(
|
||||||
val id: Int,
|
val id: Int,
|
||||||
|
|||||||
@@ -8,15 +8,15 @@
|
|||||||
package cn.rtast.fancybot.entity.mc
|
package cn.rtast.fancybot.entity.mc
|
||||||
|
|
||||||
data class MCWikiSearchResponse(
|
data class MCWikiSearchResponse(
|
||||||
val pages: List<Page>
|
val pages: List<Page>,
|
||||||
) {
|
) {
|
||||||
data class Page(
|
data class Page(
|
||||||
val id: Int,
|
val id: Int,
|
||||||
val title: String,
|
val title: String,
|
||||||
val thumbnail: Thumbnail?
|
val thumbnail: Thumbnail?,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Thumbnail(
|
data class Thumbnail(
|
||||||
val url: String
|
val url: String,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -15,5 +15,5 @@ data class DeviceCodeResponse(
|
|||||||
@SerializedName("device_code")
|
@SerializedName("device_code")
|
||||||
val deviceCode: String,
|
val deviceCode: String,
|
||||||
@SerializedName("verification_uri")
|
@SerializedName("verification_uri")
|
||||||
val verificationUri: String
|
val verificationUri: String,
|
||||||
)
|
)
|
||||||
@@ -16,10 +16,10 @@ data class LoginXboxLiveResponse(
|
|||||||
val displayClaims: DisplayClaims,
|
val displayClaims: DisplayClaims,
|
||||||
) {
|
) {
|
||||||
data class DisplayClaims(
|
data class DisplayClaims(
|
||||||
val xui: List<XUI>
|
val xui: List<XUI>,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class XUI(
|
data class XUI(
|
||||||
val uhs: String
|
val uhs: String,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -11,16 +11,16 @@ data class Search(
|
|||||||
val result: Result,
|
val result: Result,
|
||||||
) {
|
) {
|
||||||
data class Result(
|
data class Result(
|
||||||
val songs: List<Song>
|
val songs: List<Song>,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Song(
|
data class Song(
|
||||||
val id: Long,
|
val id: Long,
|
||||||
val name: String,
|
val name: String,
|
||||||
val artists: List<Artist>
|
val artists: List<Artist>,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Artist(
|
data class Artist(
|
||||||
val name: String
|
val name: String,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -11,5 +11,5 @@ data class SearchedResult(
|
|||||||
val id: Long,
|
val id: Long,
|
||||||
val name: String,
|
val name: String,
|
||||||
val artists: String,
|
val artists: String,
|
||||||
val timestamp: Long
|
val timestamp: Long,
|
||||||
)
|
)
|
||||||
@@ -8,9 +8,9 @@
|
|||||||
package cn.rtast.fancybot.entity.music
|
package cn.rtast.fancybot.entity.music
|
||||||
|
|
||||||
data class SongUrl(
|
data class SongUrl(
|
||||||
val data: List<Data>
|
val data: List<Data>,
|
||||||
) {
|
) {
|
||||||
data class Data(
|
data class Data(
|
||||||
val url: String
|
val url: String,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -8,13 +8,13 @@
|
|||||||
package cn.rtast.fancybot.entity.music
|
package cn.rtast.fancybot.entity.music
|
||||||
|
|
||||||
data class TopSong(
|
data class TopSong(
|
||||||
val data: List<Data>
|
val data: List<Data>,
|
||||||
) {
|
) {
|
||||||
data class Data(
|
data class Data(
|
||||||
val privilege: Privilege
|
val privilege: Privilege,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Privilege(
|
data class Privilege(
|
||||||
val id: Long
|
val id: Long,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -13,15 +13,15 @@ data class QQMSearch(
|
|||||||
val response: Response,
|
val response: Response,
|
||||||
) {
|
) {
|
||||||
data class Response(
|
data class Response(
|
||||||
val data: Data
|
val data: Data,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Data(
|
data class Data(
|
||||||
val song: Songs
|
val song: Songs,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Songs(
|
data class Songs(
|
||||||
val list: List<Song>
|
val list: List<Song>,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Song(
|
data class Song(
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ package cn.rtast.fancybot.entity.pixiv
|
|||||||
import com.google.gson.annotations.SerializedName
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
data class Ranking(
|
data class Ranking(
|
||||||
val contents: List<Content>
|
val contents: List<Content>,
|
||||||
) {
|
) {
|
||||||
data class Content(
|
data class Content(
|
||||||
val title: String,
|
val title: String,
|
||||||
|
|||||||
@@ -16,6 +16,6 @@ data class Setu(
|
|||||||
val authorId: Long,
|
val authorId: Long,
|
||||||
) {
|
) {
|
||||||
data class URLS(
|
data class URLS(
|
||||||
val large: String
|
val large: String,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -8,5 +8,5 @@
|
|||||||
package cn.rtast.fancybot.entity.shortlink
|
package cn.rtast.fancybot.entity.shortlink
|
||||||
|
|
||||||
data class ShortLinkPayload(
|
data class ShortLinkPayload(
|
||||||
val target: String
|
val target: String,
|
||||||
)
|
)
|
||||||
Loaded 100 of 118 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in New Issue
Block a user