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:
parent
646fb8d67c
commit
b95f83985e
1 changed files with 2 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue