add admin commands map to handlers
This commit is contained in:
parent
c87e4683db
commit
c81e781247
@ -16,6 +16,15 @@ import (
|
|||||||
"gorm.io/gorm"
|
"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 {
|
type BotController struct {
|
||||||
cfg config.Config
|
cfg config.Config
|
||||||
bot *tgbotapi.BotAPI
|
bot *tgbotapi.BotAPI
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user