FIX tgbot adminIds

This commit is contained in:
Hamidreza 2023-05-31 05:01:20 +03:30 committed by GitHub
parent 2a9cb6d29e
commit d694e6eafc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,6 +77,7 @@ func (t *Tgbot) Start(i18nFS embed.FS) error {
return err return err
} }
if tgBotid != "" {
for _, adminId := range strings.Split(tgBotid, ",") { for _, adminId := range strings.Split(tgBotid, ",") {
id, err := strconv.Atoi(adminId) id, err := strconv.Atoi(adminId)
if err != nil { if err != nil {
@ -85,6 +86,7 @@ func (t *Tgbot) Start(i18nFS embed.FS) error {
} }
adminIds = append(adminIds, int64(id)) adminIds = append(adminIds, int64(id))
} }
}
bot, err = telego.NewBot(tgBottoken) bot, err = telego.NewBot(tgBottoken)
if err != nil { if err != nil {