Don't react to message deletes if the guild hasn't been set up yet
This commit is contained in:
parent
df09fe8787
commit
e7bc0a32f6
|
@ -65,8 +65,12 @@ BotClient.on(Events.InteractionCreate, async interaction => {
|
||||||
});
|
});
|
||||||
|
|
||||||
BotClient.on(Events.MessageDelete, async message => {
|
BotClient.on(Events.MessageDelete, async message => {
|
||||||
try {
|
|
||||||
const guildId = message.guild?.id!;
|
const guildId = message.guild?.id!;
|
||||||
|
if (!dt.getGuildInfo(guildId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
const messageId = message.id;
|
const messageId = message.id;
|
||||||
const confessions = dt.getGuildInfo(guildId)?.confessions!;
|
const confessions = dt.getGuildInfo(guildId)?.confessions!;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue