add admin commands map to handlers

This commit is contained in:
Akulij 2025-03-27 20:41:41 +08:00
parent c87e4683db
commit c81e781247

View File

@ -16,6 +16,15 @@ import (
"gorm.io/gorm"
)
var adminCommands = map[string]func(BotController, tgbotapi.Update){
"/secret": handleMessage, // activate admin mode via /secret `AdminPass`
"/panel": handleMessage, // open bot settings
"/usermode": handleMessage, // temporarly disable admin mode to test ui
"/id": handleMessage, // to check id of chat
"/setchannelid": handleMessage, // just type it in channel which one is
// supposed to be lined with bot
}
type BotController struct {
cfg config.Config
bot *tgbotapi.BotAPI