Compare commits
No commits in common. "8a469a09b8b92aae8c3778b5a6ef9c77c14e9b3b" and "22aabb7531ec74fa47362a5ba8ea1fab65ed44ef" have entirely different histories.
8a469a09b8
...
22aabb7531
@ -122,7 +122,6 @@ func ProcessUpdate(bc BotController, update tgbotapi.Update) {
|
||||
log.Printf("Args: %s", args)
|
||||
|
||||
if possibleCommand == "/start" {
|
||||
bc.db.Model(&user).Update("state", "start")
|
||||
kbd := tgbotapi.NewInlineKeyboardMarkup(
|
||||
tgbotapi.NewInlineKeyboardRow(
|
||||
tgbotapi.NewInlineKeyboardButtonData(bc.GetBotContent("leave_ticket_button"), "leave_ticket_button"),
|
||||
@ -155,8 +154,7 @@ func ProcessUpdate(bc BotController, update tgbotapi.Update) {
|
||||
} else if possibleCommand == "/id" && user.IsAdmin() {
|
||||
log.Printf("THERe")
|
||||
bc.bot.Send(tgbotapi.NewMessage(update.Message.Chat.ID, strconv.FormatInt(update.Message.Chat.ID, 10)))
|
||||
} else if possibleCommand == "/secret" && len(args) > 0 && args[0] == bc.cfg.AdminPass {
|
||||
bc.db.Model(&user).Update("state", "start")
|
||||
} else if possibleCommand == "/secret" && args[0] == bc.cfg.AdminPass {
|
||||
bc.db.Model(&user).Update("RoleBitmask", user.RoleBitmask | 0b11) // set real admin ID (0b1) and effective admin toggle (0b10)
|
||||
msg := tgbotapi.NewMessage(update.Message.Chat.ID, "You are admin now!")
|
||||
bc.bot.Send(msg)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user