Teixeira
Explore posts from serversSIASapphire - Imagine a framework
•Created by Teixeira on 11/21/2024 in #sapphire-support
Precondition not triggering "chatInputCommandDenied"
I have setup the following precondition:
9 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 11/20/2024 in #discordjs-support
Is there a way to make autocomplete options only accept a listed option - not "custom" inputs?
Title
6 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 10/22/2024 in #sapphire-support
How can I delay the loading of pieces?
Is there a way I can control when the pieces are loaded instead of having them loaded automatically on
<SapphireClient>.login
? I'd like to login to the client, then wait for the resolving of an async function, and then load the pieces in.13 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 6/2/2024 in #sapphire-support
Validation error in `SlashCommandBuilder.addSubcommand`
21 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 5/10/2024 in #discordjs-support
Keep getting "Shard 0 is reconnecting..." errors
2 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 4/29/2024 in #discordjs-support
Is there a way to make the bot press a button component within a message
Wondering if there's a way to simulate a button press on a message (particularly a message that wasn't sent by the bot).
3 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 3/17/2024 in #sapphire-support
"ChatInputCommandError" listener not firing for subcommands
ChatInputCommandError.ts
:
8 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 3/14/2024 in #sapphire-support
Globally setting the guild in which to register commands by default
Even though I'm setting
ApplicationCommandRegistries.setDefaultGuildIds(<GUILD_ID>);
before <SapphireClient>.login
the commands are still being registered globally. The commands do not have the guildIds
option set.114 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 1/24/2024 in #sapphire-support
NPM script stops working when tsconfig extends @sapphire/ts-config
My npm package has a simple build script:
When extending
@sapphire/ts-config
on my tsconfig.json
, it stops working. Using typescript^5.3.2
and rimraf^5.0.5
.
Strangely enough, running tsc
in the same working directory works as expected...
Full tsconfig.json
:
12 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 12/9/2023 in #sapphire-support
On Listeners
A couple questions on listener pieces:
- Where can I find a list of available sapphire event identifiers and their respective arguments?
- Does sapphire have any listeners or similar setup by default and if so which ones?
7 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 12/8/2023 in #sapphire-support
"Couldn't find a template file for that component type."
I'm having trouble setting up a custom component template using Sapphire CLI. Here's the template file (
custom-listener.ts.sapphire
):
When running npx sapphire generate custom-listener test
it returns Couldn't find a template file for that component type.
Default component templates work normally4 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 8/17/2023 in #sapphire-support
Can I have multiple autocomplete interaction handlers?
When an autocomplete interaction comes through, if one of the autocomplete handlers returns
this.none()
in the parse
method, will it still run the other handlers until it finds one that returns this.some()
?4 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 6/28/2023 in #sapphire-support
Setting autocomplete options based on other option's value
5 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 6/28/2023 in #sapphire-support
autocompleteRun for sub commands
Is it possible to setup a
autocompleteRun
for specific subcommands similar to how it is done for chatInputRun
?6 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 6/25/2023 in #sapphire-support
Is it possible to edit the default message returned by "preset preconditions"?
For example, the precondition set by
<CommandOptions.requiredClientPermissions>
returns I am missing the following permissions to run this command: Manage Channels
as the <UserError>.message
parsed in the ChatInputCommandDenied
listener, but I'd like it to return something else.7 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 6/11/2023 in #sapphire-support
Set precondition's name instead of having it resolve from file name
Is it possible to set a precondition's name manually instead of having it resolve from file name, similar to how it can be done with listeners, commands and interaction handlers?
4 replies
SIASapphire - Imagine a framework
•Created by Teixeira on 6/11/2023 in #sapphire-support
Should I create multiple interaction handlers for each interaction type?
If I'm understanding correctly the point of the
parse
method is to determine whether a specific interaction handler should run, so that means we can create multiple handlers of the same type (Button for example) right?
The guide does mention this is possible for listeners but doesn't say anything about it for interaction handlers so I just wanted to confirm, thanks!5 replies