Fix edge case crash when a channel deletion event is received before the last message in that channel is processed

This commit is contained in:
Dragory 2020-12-18 05:00:26 +02:00
parent 646fb8d67c
commit b95f83985e
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -15,6 +15,8 @@ export async function onMessageCreate(pluginData: GuildPluginData<TagsPluginType
if (!member) return;
const channel = pluginData.guild.channels.get(msg.channel_id) as TextChannel;
if (!channel) return;
const config = pluginData.config.getMatchingConfig({
member,
channelId: msg.channel_id,