We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbd74b2 commit fbcad99Copy full SHA for fbcad99
internal/bot/userbot.go
@@ -85,12 +85,17 @@ func (u *UserBotStruct) AddBotsAsAdmins() error {
85
}
86
87
for _, bot := range Workers.Bots {
88
+ isAdmin := false
89
for _, admin := range currentAdmins {
90
if admin == bot.Self.ID {
91
u.log.Sugar().Infof("Bot @%s is already an admin", bot.Self.Username)
92
+ isAdmin = true
93
continue
94
95
96
+ if isAdmin {
97
+ continue
98
+ }
99
botInfo, err := ctx.ResolveUsername(bot.Self.Username)
100
if err != nil {
101
u.log.Warn(err.Error())
0 commit comments