fix: widen discord channel type check

This commit is contained in:
Peter Steinberger
2026-01-02 12:23:16 +01:00
parent 506b66a852
commit d656db4d04

View File

@@ -122,7 +122,8 @@ export async function monitorDiscordProvider(opts: MonitorDiscordOpts = {}) {
if (message.author?.bot) return;
if (!message.author) return;
const channelType = message.channel.type;
// Discord.js typing excludes GroupDM for message.channel.type; widen for runtime check.
const channelType = message.channel.type as ChannelType;
const isGroupDm = channelType === ChannelType.GroupDM;
const isDirectMessage = channelType === ChannelType.DM;
const isGuildMessage = Boolean(message.guild);