DiscordBot icon indicating copy to clipboard operation
DiscordBot copied to clipboard

Bot crashes when automod violation occurs and is logged to a channel

Open GameParrot opened this issue 1 year ago • 4 comments

When an automod violation is logged to a channel, the bot crashes. I have it set to timeout the member on violation and send a report. Without the send report it did not crash. There was no backtrace, just a silent crash.

GameParrot avatar Jan 20 '24 16:01 GameParrot

are you using the bot to do automod actions? through mc or discord? also the report is it to discord themselves as this isnt really possible from what i remember

Project-Econome avatar Jan 20 '24 17:01 Project-Econome

I need more info if it’s specifically the send report crashing it.

what does send report do? what exactly does it contain? Can I reproduce it?

JaxkDev avatar Jan 20 '24 19:01 JaxkDev

I need more info if it’s specifically the send report crashing it.

what does send report do? what exactly does it contain? Can I reproduce it?

To reproduce it, enable automod in discord server settings in a server that the bot is in. Enable send alert and set it to a channel that the bot has access to. Then, log into an alt discord account and trigger the automod. The bot will crash as soon as the automod is triggered.

GameParrot avatar Jan 20 '24 21:01 GameParrot

I need more info if it’s specifically the send report crashing it. what does send report do? what exactly does it contain? Can I reproduce it?

To reproduce it, enable automod in discord server settings in a server that the bot is in. Enable send alert and set it to a channel that the bot has access to. Then, log into an alt discord account and trigger the automod. The bot will crash as soon as the automod is triggered.

It seems to not do it for me I don't know what's wrong on your end

Project-Econome avatar Jan 20 '24 22:01 Project-Econome

I have a feeling it would the send alert thats triggering a conversion anomaly. I shall try to reproduce and fix the issue.

JaxkDev avatar Jul 22 '24 14:07 JaxkDev

This is not an issue with DiscordBot but the underlying library DiscordPHP not having the listed embed type (auto_moderation_message) as an allowed type so the library crashes when we try to access the embed.

JaxkDev avatar Jul 22 '24 14:07 JaxkDev

All automod messages are ignored by bot for now.

JaxkDev avatar Jul 22 '24 15:07 JaxkDev