Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: incorrect conversions in object hashing #497

Closed
1 task done
EvolutionX-10 opened this issue Jul 29, 2022 · 1 comment · Fixed by #499
Closed
1 task done

bug: incorrect conversions in object hashing #497

EvolutionX-10 opened this issue Jul 29, 2022 · 1 comment · Fixed by #499

Comments

@EvolutionX-10
Copy link
Contributor

EvolutionX-10 commented Jul 29, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

When you have a chat input command and you have made no changes to the command data
After restarting your bot, it will go detect changes even when there are no changes!
It results in unnecessary api calls for updating and slows down the startup a lot if you got more commands
I tried to debug it and found that it has something to do with this as this is where these are hashed, but I think you will know it better

Steps To Reproduce

  1. Have a basic bot with ping command made with builders not tested without builders
		registry.registerChatInputCommand(
			(builder) =>
				builder //
					.setName(this.name)
					.setDescription(this.description),
			{
				guildIds: ['someID'],
				idHints: ['someID1', 'someID2']
			}
		);
  1. Once your command is registered, stop your bot and restart

  2. Make sure your Register behavior is either LogToConsole or Overwrite (overwrite causes api calls, log causes warn loggings)

  3. see that even when you didn't make any changes it says found differences and updates, more commands more time it takes

Expected behavior

It should detect properly that there are no changes! So no updates

Screenshots

No response

Additional context

Proper versions for your ease

"@sapphire/framework": "3.0.0-next.f47e6f6.0",
"@sapphire/pieces": "3.3.5",
"@sapphire/discord.js-utilities": "4.11.3",
"discord-api-types": "0.33.5",
"discord.js": "13.9.1",
@Mzato0001
Copy link

Mzato0001 commented Aug 1, 2022

Hmm the newest next version already fix it.. iirc Ah Nope

@favna favna closed this as completed in #499 Aug 5, 2022
Repository owner moved this from Todo to Done in Sapphire Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants