From 66706d9c7b6be0f6af296730916d3ab88cb3e319 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 1 Jun 2017 09:01:41 +0000 Subject: [PATCH] FSRRRRRG --- XiaoBot.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/XiaoBot.js b/XiaoBot.js index bdf71e14..20764b0e 100644 --- a/XiaoBot.js +++ b/XiaoBot.js @@ -53,8 +53,11 @@ client.on('warn', console.warn); client.on('commandError', (command, err) => console.error(command.name, err)); client.dispatcher.addInhibitor(msg => { + if (msg.channel.type === 'dm') { + return false; + } const role = msg.guild.settings.get('singleRole'); - if (!msg.guild || !msg.guild.roles.has(role) || msg.member.hasPermission('ADMINISTRATOR')) { + if (!msg.guild.roles.has(role) || msg.member.hasPermission('ADMINISTRATOR')) { return false; } if (!msg.member.roles.has(role)) {