From d6aeefc2a32e3302389ea95a9d83b9c7ac10912e Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Tue, 23 May 2017 22:33:10 +0000 Subject: [PATCH] Fix Starboard --- XiaoBot.js | 2 +- commands/random/star.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/XiaoBot.js b/XiaoBot.js index cb5fe455..a7b11ee9 100644 --- a/XiaoBot.js +++ b/XiaoBot.js @@ -82,7 +82,7 @@ client.on('messageReactionAdd', (reaction, user) => { if (reaction.emoji.name !== '⭐') return; if (reaction.count > 1) return; const msg = reaction.message; - const channel = msg.guild.settings.get('starboard'); + const channel = msg.guild.channels.get(msg.guild.settings.get('starboard')); if (!channel) return; if (user.id === msg.author.id) { if (msg.channel.permissionsFor(client.user).has('MANAGE_MESSAGES')) diff --git a/commands/random/star.js b/commands/random/star.js index b4b484a4..92438e60 100644 --- a/commands/random/star.js +++ b/commands/random/star.js @@ -25,7 +25,7 @@ module.exports = class StarCommand extends Command { async run(msg, args, reaction) { const { id } = args; - const channel = msg.guild.settings.get('starboard'); + const channel = msg.guild.channels.get(msg.guild.settings.get('starboard')); if (!channel || !channel.permissionsFor(this.client.user).has('EMBED_LINKS')) return null; try { const message = await msg.channel.fetchMessage(id);