Andeeeee / AndyCogs

My redbot cogs.
MIT License
6 stars 2 forks source link

[Giveaway] A few commands with the is_manager checks errors out in DMs #6

Closed npc203 closed 3 years ago

npc203 commented 3 years ago

https://github.com/Andeeeee/AndysNeverToBeApprovedUntil3021Cogs/blob/main/giveaways/giveaway.py#L37

That line, if the ctx.guild is None (As it happens in DMs) errors out while getting the role. a simple fix would be putting the next 2 lines

if ctx.guild is None:
        return False

above line 37, so that it returns false already.

but its upto you, to make a better fix or smth.

Andeeeee commented 3 years ago

got it