mirror of
https://github.com/alireza0/x-ui.git
synced 2026-08-28 12:22:21 +00:00
FIX tgbot adminIds
This commit is contained in:
parent
7a6f5eef28
commit
4356afebc6
1 changed files with 8 additions and 6 deletions
|
|
@ -64,13 +64,15 @@ func (t *Tgbot) Start(i18nFS embed.FS) error {
|
|||
return err
|
||||
}
|
||||
|
||||
for _, adminId := range strings.Split(tgBotid, ",") {
|
||||
id, err := strconv.Atoi(adminId)
|
||||
if err != nil {
|
||||
logger.Warning("Failed to get IDs from GetTgBotChatId:", err)
|
||||
return err
|
||||
if tgBotid != "" {
|
||||
for _, adminId := range strings.Split(tgBotid, ",") {
|
||||
id, err := strconv.Atoi(adminId)
|
||||
if err != nil {
|
||||
logger.Warning("Failed to get IDs from GetTgBotChatId:", err)
|
||||
return err
|
||||
}
|
||||
adminIds = append(adminIds, int64(id))
|
||||
}
|
||||
adminIds = append(adminIds, int64(id))
|
||||
}
|
||||
|
||||
bot, err = tgbotapi.NewBotAPI(tgBottoken)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue