diff --git a/commands/results.js b/commands/results.js index fa3b03b..5ae83be 100644 --- a/commands/results.js +++ b/commands/results.js @@ -122,8 +122,8 @@ module.exports = { } } } - let guildID; - message.guild === null ? guildID = '' : guildID = message.guild.id; + let guildID = ''; + !message.guild ? guildID = message.channel.id : guildID = message.guild.id; timezoneModel.find({ guildid: guildID }, function (err, result) {