Reduce loading time of ApplicationCommandRegistries
Hello all, I am experiencing a non-issue where the application command registries are taking over a minute to load. This is consistent, so I'm curious if there is any way to reduce this loading time. The bot has around 16 commands, most with minimal to no options.
22 Replies
you could change your default registry behaviour to bulk overwrite instead of having it compare each command for differences (i think that is the default, i can't remember).
https://www.sapphirejs.dev/docs/Guide/commands/application-commands/application-command-registry/advanced/setting-global-behavior-when-not-identical
Sapphire Framework
Configuring the global behavior when commands are not identical | S...
Configuring the global behavior is easy! You just need to import the
when i do development, i often start and restart the bot. if i ewre to use that, would there be negative impacts (i.e. ratelimits) if i were to do it too often?
i've never had any problems with it myself but i don't think i really restart my bot that much during dev
Sounds like a network issue tbh...
hm?

could still be ping to the discord server but still weird.
short of using bluk overwrite I think the only thing we can realistically do for you here is if you share each and every command registration code bit, or preferebly the whole code base so @vladdy (who wrote all the diffing loging) can analyze it
if you use bulkoverwrite, the time comes from discord unfortunately, not us. for non-overwrite... use VerboseOverwrite to see whats taking longer but I doubt we can do much
aha. i have found the issue. for every load, sapphire attempts to update every command because:
so i went through and added integration types to all of my commands. it now takes 3-4ms.
huh I thought you fixed integration types long ago @vladdy
i thought so too :dead:
packages:
i think im on latest
lmk if im not 🙃
No you definitely have it right
and yeah there's code for it so I dont understand why
Can you share the command pls
all of them
Nah just one thats throwing this error, and I only need the registerApplicationCommands method
all of them are throwing this error
then the simplest one that throws this error pls :Prayge:
but i guess
uh
the help command ‼️
fun, ty
to fix i simply added
i'll investigate tomorrow
tysm