tempban
mod
after tempban ends user to be unbanned
instead log is spammed with
Jul 31 23:58:02 bb-8 redbot[26623]: [2019-07-31 23:58:02] [INFO] red.mod: Failed to unban member due to permissions
Jul 31 23:59:03 bb-8 redbot[26623]: [2019-07-31 23:59:03] [INFO] red.mod: Failed to unban member due to permissions
Aug 01 00:00:03 bb-8 redbot[26623]: [2019-08-01 00:00:03] [INFO] red.mod: Failed to unban member due to permissions
Aug 01 00:01:03 bb-8 redbot[26623]: [2019-08-01 00:01:03] [INFO] red.mod: Failed to unban member due to permissions
Aug 01 00:02:03 bb-8 redbot[26623]: [2019-08-01 00:02:03] [INFO] red.mod: Failed to unban member due to permissions
tempban someone and then wait for ban to be over and for the bot to attempt to unban
For information, I am also getting the same thing on an old version of Red (3.0.2).
[01/08/2019 00:22] INFO mod check_tempban_expirations 1504: Failed to unban member due to permissions
[01/08/2019 00:22] INFO mod check_tempban_expirations 1504: Failed to unban member due to permissions
Is the user actually banned? Can you still see them in the bans list for the server? And you're absolutely positive that the bot has unban permissions?
This message is literally only ever logged if guild.unban() raises a discord.Forbidden exception.
That means the bot is literally sending the ban request to Discord and it's responding with a 403.
I've tried unbanning by directly using guild.unban() on my own bot and the only time it ever responds with 403 is when the bot is missing the BAN_MEMBERS permission. If the user isn't banned, it responds with a 404 and would say as such in the logged message.
Hm yeah, sounds like since preda and I both run public red instances that both our bots lost the ban member perms in some server that we don't control. Which resulted in it spamming our logs with that
Should probably be changed to skip even trying without ban perms and log the lack of perms (still needs to catch the forbidden due to 2FA related forbiddens) Upon a 2FA fail, skip the remaining unbans for that guild.
extra info should be in the log message as well (guild id at minimum, member id likely)
Should have mentioned some thing about this sooner, but kept forgetting about/ignoring it, but it seems that this issue is still prevalent at least for @PredaaA and I still. Since Devils changes, it does give us a bit more insight, but it still endless posts to our logs each minute with
Nov 04 23:45:10 bb-8-3 redbot[19551]: [2019-11-04 23:45:10] [INFO] red.mod: Failed to unban member: error code: 10026
Nov 04 23:46:11 bb-8-3 redbot[19551]: [2019-11-04 23:46:11] [INFO] red.mod: Failed to unban member: error code: 10026
Nov 04 23:47:14 bb-8-3 redbot[19551]: [2019-11-04 23:47:14] [INFO] red.mod: Failed to unban member: error code: 10026
@kennnyshiwa you may need to get in touch with someone at discord about this. The error code there doesn't appear to exist https://discordapp.com/developers/docs/topics/opcodes-and-status-codes
Most helpful comment
extra info should be in the log message as well (guild id at minimum, member id likely)