discord.js icon indicating copy to clipboard operation
discord.js copied to clipboard

multiple resolves on ws events ( messageCreate, interactionCreate ) and fetching application commands

Open jacoobes opened this issue 2 years ago • 4 comments

Which package is this bug report for?

discord.js

Issue description

  1. ) Turn on the process event 'multiple resolves'
  2. ) Set up ws events (messageCreate, interactionCreate)
  3. 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

jacoobes avatar Jul 18 '22 17:07 jacoobes

I might be missing something here. So... what's the issue?

Jiralite avatar Jul 18 '22 18:07 Jiralite

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

jacoobes avatar Jul 18 '22 18:07 jacoobes

I'm testing V14.0.3 and the same thing is happening...

visaoo avatar Jul 20 '22 03:07 visaoo

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?

Jiralite avatar Jul 20 '22 03:07 Jiralite

This is a non-issue.

didinele avatar May 05 '23 20:05 didinele