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