chore: add command prefix

This commit is contained in:
2024-10-27 18:01:54 +08:00
parent a99f636158
commit f9b52c8c4b
1 file changed
+5 -5
@@ -94,10 +94,10 @@ class FancyBot : OneBotListener {
val plainTextContent = getMsg.message val plainTextContent = getMsg.message
.filter { it.type == ArrayMessageType.text } .filter { it.type == ArrayMessageType.text }
.joinToString { it.data.text!! } .joinToString { it.data.text!! }
if (command.contains("倒放") || command.contains("/df")) ReverseGIFCommand.reverse(message, getMsg) if (command.contains("/倒放") || command.contains("/df")) ReverseGIFCommand.reverse(message, getMsg)
if (command.contains("图来") || command.contains("图链")) ImageURLCommand.callback(message, getMsg) if (command.contains("/图来") || command.contains("/图链")) ImageURLCommand.callback(message, getMsg)
if (command.contains("reaction")) ReactionCommand.reaction(message) if (command.contains("/reaction")) ReactionCommand.reaction(message)
if (command.contains("图床")) ImageBedCommand.execute(getMsg, message) if (command.contains("/图床")) ImageBedCommand.execute(getMsg, message)
if (command.contains("/sl") || command.contains("/short")) message.reply( if (command.contains("/sl") || command.contains("/short")) message.reply(
plainTextContent.trim().makeShortLink() plainTextContent.trim().makeShortLink()
) )
@@ -112,7 +112,7 @@ class FancyBot : OneBotListener {
val pastebinUrl = PastebinCommand.createPastebin(plainTextContent) val pastebinUrl = PastebinCommand.createPastebin(plainTextContent)
message.reply(pastebinUrl) message.reply(pastebinUrl)
} }
if (command.contains("加速")) { if (command.contains("/加速")) {
val multiply = command.split("加速").last().toFloat() val multiply = command.split("加速").last().toFloat()
SpeedUpGIFCommand.speedUp(message, getMsg, multiply) SpeedUpGIFCommand.speedUp(message, getMsg, multiply)
} }