Don't react to message deletes if the guild hasn't been set up yet

This commit is contained in:
powermaker450 2024-10-18 15:23:18 -04:00
parent df09fe8787
commit e7bc0a32f6

View file

@ -65,8 +65,12 @@ BotClient.on(Events.InteractionCreate, async interaction => {
});
BotClient.on(Events.MessageDelete, async message => {
const guildId = message.guild?.id!;
if (!dt.getGuildInfo(guildId)) {
return;
}
try {
const guildId = message.guild?.id!;
const messageId = message.id;
const confessions = dt.getGuildInfo(guildId)?.confessions!;