From 16515e461c19b315ca543c15651217792facb1e2 Mon Sep 17 00:00:00 2001 From: Ske Date: Sat, 9 Mar 2019 12:59:19 +0100 Subject: [PATCH] Fix error when trying to message list in DMs --- src/pluralkit/bot/commands/system_commands.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pluralkit/bot/commands/system_commands.py b/src/pluralkit/bot/commands/system_commands.py index 5d687597..2b861295 100644 --- a/src/pluralkit/bot/commands/system_commands.py +++ b/src/pluralkit/bot/commands/system_commands.py @@ -396,5 +396,7 @@ async def system_list(ctx: CommandContext, system: System): current_page = (current_page + 1) % page_count # If we can, remove the original reaction from the member - if ctx.message.channel.permissions_for(ctx.message.guild.get_member(ctx.client.user.id)).manage_messages: - await reaction.remove(ctx.message.author) \ No newline at end of file + # 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: + await reaction.remove(ctx.message.author) \ No newline at end of file