Favna
SIASapphire - Imagine a framework
•Created by Shrewd 💫 on 3/12/2025 in #sapphire-support
Plugin API
yes, yes and yes
5 replies
SIASapphire - Imagine a framework
•Created by Prosta4ok_ua on 3/9/2025 in #sapphire-support
how to make paginated message ephemeral?
defer with ephemeral then call run
3 replies
SIASapphire - Imagine a framework
•Created by f1fty on 3/6/2025 in #sapphire-support
use wildcard paths on InteractionHandlerStore#registerPath
Sorry wildcards are not supported, but subdirectories are automatically traversed (and turned into categories)
5 replies
SIASapphire - Imagine a framework
•Created by secre on 3/5/2025 in #sapphire-support
Interaction Handlers & "Button is not for you" response
Truth be told I would advice against it anyway because it goes principally against how Discord tells us to use interactions. Interactions should only be replied to once. The only consistent way to achieve this is to use something like discordjs'
awaitComponents
where you can user filter instead of sappire handlers. An example of this can be seen in PaginatedMessage i.e.e from @Dragonite5 replies
SIASapphire - Imagine a framework
•Created by Dreechu on 3/5/2025 in #sapphire-support
VoiceStateUpdate
This is DiscordJS related, not Sapphire related. Likely you're missing something like an intent or permissions.
4 replies
SIASapphire - Imagine a framework
•Created by ivirtex on 2/24/2025 in #sapphire-support
Is there a better way to handle both message and slash commands?
just extract most logic to a separate function and call it from both, i.e. the ping commands from sapphiredev/examples repo
4 replies
SIASapphire - Imagine a framework
•Created by ✞ on 2/22/2025 in #sapphire-support
I have use @/ as Root
I can see the advantages yes but I would recommend using the NodeJS solution still as there are also runtime advantages of having shorter and aliased paths (minor speed improvements in path resolutions) and you can only achieve that with the NodeJS built in method.
10 replies
SIASapphire - Imagine a framework
•Created by ✞ on 2/22/2025 in #sapphire-support
I have use @/ as Root
No idea. Written guides and documentation are far more valuable for programming anyway as they are less likely to be heavily opinionated and or outdated.
Many bots from the following list use it though:
10 replies
SIASapphire - Imagine a framework
•Created by ✞ on 2/22/2025 in #sapphire-support
I have use @/ as Root
10 replies
SIASapphire - Imagine a framework
•Created by ✞ on 2/22/2025 in #sapphire-support
I have use @/ as Root
setting it in only tsconfig isnt enough. Ts doesnt recompute paths when compiling. Either use NodeJS built in submodule imports and switch to
#
instead of @
in the process, or use something like the module-alias package.10 replies
SIASapphire - Imagine a framework
•Created by Zue on 2/22/2025 in #sapphire-support
Is there a way to make an Event (registerApplicationCommands) 'wait' before triggering?
@vladdy?
350 replies
SIASapphire - Imagine a framework
•Created by Zue on 2/22/2025 in #sapphire-support
Is there a way to make an Event (registerApplicationCommands) 'wait' before triggering?
honestly you've kind of lost me... but to answer the question of
Is there a way to make an Event (registerApplicationCommands) 'wait' before triggering?afaik no.
350 replies
SIASapphire - Imagine a framework
•Created by Zue on 2/22/2025 in #sapphire-support
Is there a way to make an Event (registerApplicationCommands) 'wait' before triggering?
Sounds like what you're really looking for is https://sapphirejs.dev/docs/Guide/commands/application-commands/application-command-registry/advanced/registering-application-commands-outside-a-command
350 replies
SIASapphire - Imagine a framework
•Created by ✞ on 2/19/2025 in #sapphire-support
Button Interaction Pass Data
For my bot Bloombot I pass an identifier as well as a database id throug the custom id in the format of
prefix-job|databaseid
then I extract the first part in my parse function (https://github.com/favware/bloombot/blob/main/src/interaction-handlers/buttons/jobs/melee/dragoon.ts) and the second part in the handler (https://github.com/favware/bloombot/blob/main/src/lib/util/functions/handleJobOrRoleButtonClick.ts#L11)
On the other hand, for @Dragonite I dump everything in the custom_id using a custom compression algorithm to ensure it is never above the 100 character limit that Discord permits
https://github.com/favware/dragonite/blob/main/src/commands/Pokemon/pokemon.ts#L107
https://github.com/favware/dragonite/blob/main/src/interaction-handlers/select-menus/pokemonSelectMenu.ts#L6113 replies
SIASapphire - Imagine a framework
•Created by ✞ on 2/19/2025 in #sapphire-support
Button Interaction Pass Data
there is no one correct way
13 replies
SIASapphire - Imagine a framework
•Created by ✞ on 2/19/2025 in #sapphire-support
Button Interaction Pass Data
how you solve that exactly is up to you and how to you determine what data to pass in what way is also up to you.
13 replies
SIASapphire - Imagine a framework
•Created by ✞ on 2/19/2025 in #sapphire-support
Button Interaction Pass Data
The answer I gave is still the correct one. You'll need to store the data either in the custom_id, or some in memory storage (be that in nodejs memory or redis or a persistent database like sqlite, postgres, mysql, etc).
13 replies