discord.js
discord.js copied to clipboard
multiple resolves on ws events ( messageCreate, interactionCreate ) and fetching application commands
Which package is this bug report for?
discord.js
Issue description
- ) Turn on the process event 'multiple resolves'
- ) Set up ws events (messageCreate, interactionCreate)
- You can also try to fetch application commands from the client
Code sample
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent
],
});
client.on('messageCreate', m => {
if(m.author.bot) return;
console.log(m)
});
client.on('interactionCreate', async i => {
await (i as CommandInteraction).reply('meow');
await client.application!.commands.fetch();
})
process.on('multipleResolves', (t, p, r) => {
console.log(t,p,r)
})
Package version
^14.0.2
Node.js version
16.14.0
Operating system
Windows 10
Priority this issue should have
Low (slightly annoying)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
Guilds, GuildMembers, GuildMessages, MessageContent
I have tested this issue on a development release
No response
I might be missing something here. So... what's the issue?
Hi, I was debugging, and I figured maybe having multiple resolves on a promise (sending to the discord api) is unwanted behavior. Unsure if it is. Still reported just in case
I'm testing V14.0.3 and the same thing is happening...
I'm testing V14.0.3 and the same thing is happening...
It's not an issue that's preventing you from doing anything. It doesn't seem like a priority?
This is a non-issue.