chore: add command description, and add command aliases
This commit is contained in:
1 file changed
+5
-2
@@ -7,6 +7,7 @@
|
||||
|
||||
package cn.rtast.fancybot.commands.niuzi
|
||||
|
||||
import cn.rtast.fancybot.annotations.CommandDescription
|
||||
import cn.rtast.fancybot.niuziBankManager
|
||||
import cn.rtast.fancybot.niuziManager
|
||||
import cn.rtast.rob.entity.GroupMessage
|
||||
@@ -14,8 +15,9 @@ import cn.rtast.rob.util.BaseCommand
|
||||
import cn.rtast.rob.util.ob.MessageChain
|
||||
import cn.rtast.rob.util.ob.OneBotListener
|
||||
|
||||
@CommandDescription("查询所有人的牛子的排行榜")
|
||||
class NiuziRankCommand : BaseCommand() {
|
||||
override val commandNames = listOf("牛子排行榜")
|
||||
override val commandNames = listOf("牛子排行榜", "牛子排行")
|
||||
|
||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
||||
val allNiuzi = niuziManager.getAllNiuzi().sortedBy { it.length }.reversed()
|
||||
@@ -27,8 +29,9 @@ class NiuziRankCommand : BaseCommand() {
|
||||
}
|
||||
}
|
||||
|
||||
@CommandDescription("查询所有人的银行账户余额排行榜")
|
||||
class NiuziBankRankCommand : BaseCommand() {
|
||||
override val commandNames = listOf("牛子富豪榜")
|
||||
override val commandNames = listOf("牛子富豪榜", "富豪榜")
|
||||
|
||||
override suspend fun executeGroup(listener: OneBotListener, message: GroupMessage, args: List<String>) {
|
||||
val allNiuziBankAccounts = niuziBankManager.getAllAccount()
|
||||
|
||||
Reference in New Issue
Block a user