chore: rename gpt command to ai command
This commit is contained in:
2 files changed
+6
-6
No files matched your search
@@ -13,7 +13,7 @@ import cn.rtast.fancybot.commands.HelpCommand
|
||||
import cn.rtast.fancybot.commands.StatusCommand
|
||||
import cn.rtast.fancybot.commands.lookup.CigaretteCommand
|
||||
import cn.rtast.fancybot.commands.lookup.DomainPriceCommand
|
||||
import cn.rtast.fancybot.commands.lookup.GPTCommand
|
||||
import cn.rtast.fancybot.commands.lookup.AICommand
|
||||
import cn.rtast.fancybot.commands.lookup.GithubUserCommand
|
||||
import cn.rtast.fancybot.commands.lookup.MCPingCommand
|
||||
import cn.rtast.fancybot.commands.lookup.MusicCommand
|
||||
@@ -217,7 +217,7 @@ val commands = listOf(
|
||||
RUACommand(), NslookupCommand(),
|
||||
NiuziSignCommand(), MyNiuziCommand(),
|
||||
JiJianCommand(), LikeMeCommand(),
|
||||
CompilerCommand(), GPTCommand(),
|
||||
CompilerCommand(), AICommand(),
|
||||
GithubUserCommand(), AboutCommand(),
|
||||
MusicPlayUrlCommand(), DomainPriceCommand(),
|
||||
SendMailCommand(), ZiBiCommand(),
|
||||
|
||||
+4
-4
@@ -18,18 +18,18 @@ import cn.rtast.rob.util.BaseCommand
|
||||
import cn.rtast.rob.util.ob.MessageChain
|
||||
import cn.rtast.rob.util.ob.OneBotListener
|
||||
|
||||
class GPTCommand : BaseCommand() {
|
||||
override val commandNames = listOf("/gpt")
|
||||
class AICommand : BaseCommand() {
|
||||
override val commandNames = listOf("/ai", "问AI")
|
||||
|
||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
||||
if (args.isEmpty()) {
|
||||
val msg = MessageChain.Builder()
|
||||
.addAt(message.sender.userId)
|
||||
.addText("发送`/gpt [模型] <问题>`即可询问AI哦~")
|
||||
.addText("发送`/ai [模型] <问题>`即可询问AI哦~")
|
||||
.addNewLine()
|
||||
.addText("不指定模型默认为`moonshot-v1-8k`")
|
||||
.addNewLine()
|
||||
.addText("发送`/gpt list`可以获取可用的模型列表~")
|
||||
.addText("发送`/ai list`可以获取可用的模型列表~")
|
||||
.build()
|
||||
listener.sendGroupMessage(message.groupId, msg)
|
||||
return
|
||||
Reference in New Issue
Block a user