fix command dispatcher for new caching

This commit is contained in:
Cynthia Foxwell 2021-08-30 13:04:38 -06:00
parent 17fab4658b
commit c2bed24794

View file

@ -72,6 +72,9 @@ bot.on("messageCreate", async (msg) => {
) { ) {
const newChannel = await bot.getDMChannel(msg.author.id); const newChannel = await bot.getDMChannel(msg.author.id);
if (msg.channel.id == newChannel.id) msg.channel = newChannel; 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) // if we still have no dm channel (threads cause this too)