Reputation:
I have been getting this error in the "interactionCreate" event in my bot, this error causes my bot to shut down every time it occurs.
TypeError: Cannot read properties of undefined (reading 'delete')
at Timeout._onTimeout (/root/Teyrox/GamesMadeInPolaDiscordBot/events/servidores/interactionCreate.js:12:403)
at listOnTimeout (node:internal/timers:557:17)
at processTimers (node:internal/timers:500:7)
The error occurs in this line of code, and after a while of research and checking I did not find any error in this line of code
if (aBoolean) return interaction.reply({ content: `<:x_:677580192641843222>`, ephemeral: true }).then(m => setTimeout(() => m.delete().catch(() => { }), 15000));
Upvotes: 1
Views: 3121