K
Kord•3mo ago
Ratledore

How do I unregister commands to reregister them with updates?

How do I unregister commands to reregister them with updates?
97 Replies
gdude
gdude•3mo ago
get the command object from Discord and call .delete() but you don't have to do that if you're just updating a command you can just create it again
Ratledore
Ratledore•3mo ago
It's not updating
kord.createGlobalChatInputCommand("item", "Estimates a price for a given item") {
attachment("image", "A screenshot of the popup when you hover the item") {
required = true
}
}
kord.createGlobalChatInputCommand("item", "Estimates a price for a given item") {
attachment("image", "A screenshot of the popup when you hover the item") {
required = true
}
}
I'm running this and it doesn't update
gdude
gdude•3mo ago
did you wait an hour before checking that? global commands can take a while to be evicted from the client's cache
Ratledore
Ratledore•3mo ago
No, ah I remember that's a thing... IIRC you can do it on each guild and its instant right?
gdude
gdude•3mo ago
guild ones are usually instant yeah
Ratledore
Ratledore•3mo ago
How can I get access to all guilds we're in?
gdude
gdude•3mo ago
kord.guilds current shard only I think you seem like you're writing a framework, are you sure you wouldn't prefer to use an existing one?
Ratledore
Ratledore•3mo ago
do I call that after .login or anywhere in particular? And wdym a framework? I'm just copying the docs
gdude
gdude•3mo ago
ah, I see kord provides the protocol implementation, frameworks provide the abstractions on top for actually writing the bot and you'd have to call it after your guilds have been received you might be better off reacting to the guild creation event
Ratledore
Ratledore•3mo ago
kord is just a wrapper of the discord API, and there are other higher level frameworks built on kord that would make my life easier?
gdude
gdude•3mo ago
pretty much yeah
Ratledore
Ratledore•3mo ago
Would you recommend any?
gdude
gdude•3mo ago
I maintain kordex so I'd rec that, but there's a comparison table here https://docs.kordex.dev/framework-comparison.html
Ratledore
Ratledore•3mo ago
Is it well documented?
gdude
gdude•3mo ago
well, that's the documentation site it's not finished but a good chunk of the important stuff is done
Want results from more Discord servers?
Add your server