-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
46 additions
and
799 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,5 @@ logs/ | |
|
||
device.json | ||
gradle/ | ||
|
||
bots/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/kotlin/top/wsure/warframe/command/ChatCommandEditor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package top.wsure.warframe.command | ||
|
||
import net.mamoe.mirai.console.command.CommandSender | ||
import net.mamoe.mirai.console.command.ConsoleCommandSender.sendMessage | ||
import net.mamoe.mirai.console.command.SimpleCommand | ||
import net.mamoe.mirai.console.command.descriptor.ExperimentalCommandDescriptors | ||
import net.mamoe.mirai.console.command.isConsole | ||
import net.mamoe.mirai.console.util.ConsoleExperimentalApi | ||
import net.mamoe.mirai.message.data.PlainText | ||
import top.wsure.warframe.WorldState | ||
import top.wsure.warframe.data.WorldStateData | ||
|
||
object ChatCommandEditor: SimpleCommand( | ||
WorldState, | ||
"chat-command", | ||
"聊天命令","cm","chatCommand", | ||
description = "聊天命令转发设置" | ||
) { | ||
@ExperimentalCommandDescriptors | ||
@ConsoleExperimentalApi | ||
override val prefixOptional = true | ||
|
||
@Handler | ||
suspend fun CommandSender.handle(useCM:Boolean) { // 函数名随意, 但参数需要按顺序放置. | ||
if (isConsole()) { | ||
WorldStateData.useCM = useCM | ||
sendMessage(PlainText("设置使用聊天命令${if (WorldStateData.useCM) "开启,可以在聊天中使用命令" else "关闭,再次开启需要在控制台执行"}")) | ||
} | ||
} | ||
} |
28 changes: 0 additions & 28 deletions
28
src/main/kotlin/top/wsure/warframe/command/DatabaseCommand.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.