From bbeaa8049e523b9134c73a7bc58b1c742e72a00e Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Fri, 19 Apr 2019 02:30:32 +0700 Subject: [PATCH] Solve DM issues I didn't face this on official RS one but one of forks had the issue so /shrug --- helpers/checks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helpers/checks.py b/helpers/checks.py index 417eb1e..aad2817 100644 --- a/helpers/checks.py +++ b/helpers/checks.py @@ -23,9 +23,13 @@ def check_if_staff_or_ot(ctx): def check_if_collaborator(ctx): + if not ctx.guild: + return False return any(r.id in config.staff_role_ids + config.allowed_pin_roles for r in ctx.author.roles) def check_if_pin_channel(ctx): + if not ctx.guild: + return False return ctx.message.channel.id in config.allowed_pin_channels