mirror of
https://github.com/InsanusMokrassar/PlaguBotCommandsPlugin.git
synced 2025-10-23 16:20:01 +00:00
update readme
This commit is contained in:
@@ -7,6 +7,7 @@ import dev.inmo.plagubot.Plugin
|
||||
import dev.inmo.tgbotapi.extensions.api.bot.*
|
||||
import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext
|
||||
import dev.inmo.tgbotapi.types.BotCommand
|
||||
import dev.inmo.tgbotapi.types.botCommandsLimit
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.json.JsonObject
|
||||
import org.jetbrains.exposed.sql.Database
|
||||
@@ -34,7 +35,7 @@ class CommandsPlugin : Plugin {
|
||||
runCatchingSafely {
|
||||
commands ?.let {
|
||||
setMyCommands(
|
||||
commands.distinctBy { it.command },
|
||||
commands.distinctBy { it.command }.take(botCommandsLimit.last + 1),
|
||||
key.scope,
|
||||
key.languageCode
|
||||
)
|
||||
|
Reference in New Issue
Block a user