v1.0.0 beta 1

This commit is contained in:
2026-02-26 15:12:36 +03:00
parent 28ec2b7ca9
commit 786da652e6
8 changed files with 95 additions and 59 deletions

View File

@@ -27,7 +27,7 @@ func generateBotCommand[T any](cmd Command[T]) tgapi.BotCommand {
func generateBotCommandForPlugin[T any](pl Plugin[T]) []tgapi.BotCommand {
commands := make([]tgapi.BotCommand, 0)
for _, cmd := range pl.Commands {
for _, cmd := range pl.commands {
if cmd.skipAutoCmd {
continue
}
@@ -46,6 +46,10 @@ func (bot *Bot[T]) AutoGenerateCommands() error {
commands := make([]tgapi.BotCommand, 0)
for _, pl := range bot.plugins {
if pl.skipAutoCmd {
continue
}
commands = append(commands, generateBotCommandForPlugin(pl)...)
}
if len(commands) > 100 {