Fix error when trying to message list in DMs

This commit is contained in:
Ske 2019-03-09 12:59:19 +01:00
parent d8f2fe9c48
commit 16515e461c

View File

@ -396,5 +396,7 @@ async def system_list(ctx: CommandContext, system: System):
current_page = (current_page + 1) % page_count current_page = (current_page + 1) % page_count
# If we can, remove the original reaction from the member # If we can, remove the original reaction from the member
# Don't bother checking permission if we're in DMs (wouldn't work anyway)
if ctx.message.guild:
if ctx.message.channel.permissions_for(ctx.message.guild.get_member(ctx.client.user.id)).manage_messages: if ctx.message.channel.permissions_for(ctx.message.guild.get_member(ctx.client.user.id)).manage_messages:
await reaction.remove(ctx.message.author) await reaction.remove(ctx.message.author)