mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
FIX tgbot adminIds
This commit is contained in:
parent
2a9cb6d29e
commit
d694e6eafc
1 changed files with 8 additions and 6 deletions
|
@ -77,13 +77,15 @@ func (t *Tgbot) Start(i18nFS embed.FS) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, adminId := range strings.Split(tgBotid, ",") {
|
if tgBotid != "" {
|
||||||
id, err := strconv.Atoi(adminId)
|
for _, adminId := range strings.Split(tgBotid, ",") {
|
||||||
if err != nil {
|
id, err := strconv.Atoi(adminId)
|
||||||
logger.Warning("Failed to get IDs from GetTgBotChatId:", err)
|
if err != nil {
|
||||||
return err
|
logger.Warning("Failed to get IDs from GetTgBotChatId:", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
adminIds = append(adminIds, int64(id))
|
||||||
}
|
}
|
||||||
adminIds = append(adminIds, int64(id))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bot, err = telego.NewBot(tgBottoken)
|
bot, err = telego.NewBot(tgBottoken)
|
||||||
|
|
Loading…
Reference in a new issue