Skip to content

Commit

Permalink
feat: homoint
Browse files Browse the repository at this point in the history
  • Loading branch information
guimc233 committed Feb 23, 2024
1 parent bdefc6a commit ef81b17
Show file tree
Hide file tree
Showing 4 changed files with 1,146 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
* 这是[Mirai](https://github.com/mamoe/mirai)框架的插件,依赖于[Mirai Console](https://github.com/mamoe/mirai-console)运行.
* 本插件可以为使用者提供群消息合规性检查,并作出相应的处罚.
* 还有一些有趣的小东西 \>_\<
* Thanks to [LL4J](https://github.com/LL4J/) and [ADDetector4J](https://github.com/siuank/ADDetector4J)
* Thanks to [LL4J](https://github.com/LL4J/), [ADDetector4J](https://github.com/siuank/ADDetector4J)
and [恶臭数字论证器](https://github.com/itorr/homo)

## License
This project is subject to the [GNU Affero General Public License v3.0](LICENSE). This does only apply for source code located directly in this clean repository. During the development and compilation process, additional source code may be used to which we have obtained no rights. Such code is not covered by the GPL license.
Expand Down
30 changes: 30 additions & 0 deletions src/main/kotlin/ltd/guimc/lgzbot/command/HomoIntCommand.kt
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))
}
}
Loading

0 comments on commit ef81b17

Please sign in to comment.