From c2bed247949966bba25ca603b775f14f4dedd572 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Mon, 30 Aug 2021 13:04:38 -0600 Subject: [PATCH] fix command dispatcher for new caching --- src/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.js b/src/index.js index 579fe84..d48fca7 100644 --- a/src/index.js +++ b/src/index.js @@ -72,6 +72,9 @@ bot.on("messageCreate", async (msg) => { ) { const newChannel = await bot.getDMChannel(msg.author.id); if (msg.channel.id == newChannel.id) msg.channel = newChannel; + } else if (msg.guildID && !(msg.channel instanceof Eris.Channel)) { + const newChannel = bot.guilds.get(msg.guildID).channels.get(msg.channel.id); + if (newChannel) msg.channel = newChannel; } // if we still have no dm channel (threads cause this too)