This commit is contained in:
Akulij 2025-03-28 15:48:57 +08:00
parent 61214ca405
commit b7c01addcf
3 changed files with 43 additions and 41 deletions

View File

@ -21,7 +21,7 @@ var adminCommands = map[string]func(BotController, tgbotapi.Update, User){
"/setchannelid": handleDefaultMessage, // just type it in channel which one is supposed to be lined with bot
}
var nearDatesApril = []int {1, 3} // why? because it is as temporal as it can be
var nearDatesApril = []int{1, 3} // why? because it is as temporal as it can be
func main() {
var bc = GetBotController()

View File

@ -1,6 +1,6 @@
package main
var assets = map[string]string {
var assets = map[string]string{
"Стартовая картинка": "preview_image",
"Приветственный текст": "start",
"Кнопка для заявки": "leave_ticket_button",
@ -13,7 +13,9 @@ var assets = map[string]string {
}
func handlePanel(bc BotController, user User) {
if !user.IsAdmin() {return}
if !user.IsAdmin() {
return
}
if !user.IsEffectiveAdmin() {
bc.db.Model(&user).Update("RoleBitmask", user.RoleBitmask|0b10)
sendMessage(bc, user.ID, "You was in usermode, turned back to admin mode...")