generated from project-mirai/mirai-console-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
4 changed files
with
1,146 additions
and
4 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
30 changes: 30 additions & 0 deletions
30
src/main/kotlin/ltd/guimc/lgzbot/command/HomoIntCommand.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 @@ | ||
/* | ||
* THIS FILE IS PART OF lgz-bot PROJECT | ||
* | ||
* You must disclose the source code of your modified work and the source code you took from this project. This means you are not allowed to use code from this project (even partially) in a closed-source (or even obfuscated) application. | ||
* Your modified application must also be licensed under the AGPLv3. | ||
* | ||
* Copyright (c) 2022 - now Guimc Team. | ||
*/ | ||
|
||
package ltd.guimc.lgzbot.command | ||
|
||
import kotlinx.coroutines.launch | ||
import ltd.guimc.lgzbot.PluginMain | ||
import ltd.guimc.lgzbot.utils.HomoIntUtils | ||
import net.mamoe.mirai.console.command.CommandSender | ||
import net.mamoe.mirai.console.command.SimpleCommand | ||
|
||
object HomoIntCommand : SimpleCommand( | ||
owner = PluginMain, | ||
primaryName = "homoint", | ||
secondaryNames = arrayOf("homo"), | ||
description = "随处可见的Homo(恼" | ||
) { | ||
@Handler | ||
fun CommandSender.onHandler(num: Long) = ltd_guimc_lgzbot_homoint(num) | ||
|
||
fun CommandSender.ltd_guimc_lgzbot_homoint(num: Long) = launch { | ||
sendMessage(HomoIntUtils.getInt(num)) | ||
} | ||
} |
Oops, something went wrong.