Closed tigattack closed 1 year ago
Perhaps deprecating explicit DM notifications in favour of the Red.send_to_owners
function would be more appropriate. Certain cleaner to handle in the code.
I'm happy to implement a fix for this, just let me know how which approach you'd prefer @NeuroAssassin.
The latter would be my personal preference, but it's your cog :)
The particular error you posted is because the cog does not properly handle cases where the bot cannot send a message to a particular channel. For users, that happens if the bot is blocked or if the user has "Allow direct messages" set or not. For channels, that is based on the guild permissions.
That being said, the cog also does not properly handle any custom Red ownership settings, instead always defaulting to the application owner.
Addressed in #85.
That's curious since I allow DMs and of course haven't blocked the bot. PR resolved my issue though, thanks!
I have one bot owned by a team and another owned by a single user, the former fails to function and the latter works as expected. Both have identical configurations as far as this cog goes.
Here's an example of how such a situation is handled in Red's code https://github.com/Cog-Creators/Red-DiscordBot/blob/V3/develop/redbot/core/core_commands.py#L419-L423
This is for owner/team name, rather than messaging, but maybe a handy reference nonetheless.