You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
err- Error kicking from guild: HTTP 403 Forbidden, {"message": "Missing Permissions", "code": 50013}
even the bot has higher role than the person and has proper permissions but it isnt kicking..
code-
func channelDelete(s *discordgo.Session, c *discordgo.ChannelDelete) {
currentTime := time.Now()
if currentTime.Sub(lastResetTime) > timeWindow {
channelDeletions = make(map[string]int)
lastResetTime = currentTime
}
guildID := c.GuildID
channelDeletions[guildID]++
if channelDeletions[guildID] > deletionThreshold {
err := s.GuildMemberDelete(guildID, s.State.User.ID)
if err != nil {
if err.Error() == "403 Forbidden" {
fmt.Println("Error kicking bot from guild: Missing Permissions")
} else {
fmt.Println("Error kicking bot from guild:", err)
}
} else {
fmt.Println("successfully kicked from guild due to excessive channel deletions")
}
}
}
its bug or what
Environment:
Library Version: latest
Go Version: latest
Additional Information:
The bot's role is confirmed to be the highest in the role hierarchy.
The bot's role has the Kick Members permission enabled.(even tested with admin)
The text was updated successfully, but these errors were encountered:
err- Error kicking from guild: HTTP 403 Forbidden, {"message": "Missing Permissions", "code": 50013}
even the bot has higher role than the person and has proper permissions but it isnt kicking..
code-
its bug or what
Environment:
Library Version: latest
Go Version: latest
Additional Information:
The bot's role is confirmed to be the highest in the role hierarchy.
The bot's role has the Kick Members permission enabled.(even tested with admin)
The text was updated successfully, but these errors were encountered: