This commit is contained in:
Akulij 2025-03-27 20:54:33 +08:00
parent 4c0d2ec3a3
commit 38c7bef71c
2 changed files with 6 additions and 9 deletions

View File

@ -1,8 +1,8 @@
package main package main
import ( import (
"log"
"errors" "errors"
"log"
"gorm.io/driver/sqlite" "gorm.io/driver/sqlite"
"gorm.io/gorm" "gorm.io/gorm"

View File

@ -17,11 +17,9 @@ var adminCommands = map[string]func(BotController, tgbotapi.Update){
"/panel": handleMessage, // open bot settings "/panel": handleMessage, // open bot settings
"/usermode": handleMessage, // temporarly disable admin mode to test ui "/usermode": handleMessage, // temporarly disable admin mode to test ui
"/id": handleMessage, // to check id of chat "/id": handleMessage, // to check id of chat
"/setchannelid": handleMessage, // just type it in channel which one is "/setchannelid": handleMessage, // just type it in channel which one is supposed to be lined with bot
// supposed to be lined with bot
} }
func main() { func main() {
var bc = GetBotController() var bc = GetBotController()
@ -352,7 +350,6 @@ func notifyAdminAboutError(bc BotController, errorMessage string) {
log.Println("AdminID is not set in the configuration.") log.Println("AdminID is not set in the configuration.")
} }
msg := tgbotapi.NewMessage( msg := tgbotapi.NewMessage(
adminID, adminID,
fmt.Sprintf("Error occurred: %s", errorMessage), fmt.Sprintf("Error occurred: %s", errorMessage),