sapphire-support
discordjs-support
old-sapphire-support
old-discordjs-support
old-application-commands-and-interactions
how to use shoukaku and kazagumo
example?
Solution:
There are no music bot library examples because music bots are by and large against Discord ToS unless they stream exclusively royalty free music (which no one wants to listen to)
On an aside, you really don't need to make yet another music bot. There's plenty out there already....
MessageCommandDenied event is not listening.
Hi, i want to change cooldown/permission message, i found reporting-precondition-failure and i do listener like this;
```ts
import { Events, Listener, type MessageCommandDeniedPayload, type UserError } from '@sapphire/framework';
export class MessageCommandDenied extends Listener<typeof Events.MessageCommandDenied> {...
Solution:
then you need to implement both listeners

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.
...
[INFO] ApplicationCommandRegistries: Initializing...
[INFO] ApplicationCommandRegistries: Took 61,304ms to initialize.
[INFO] ApplicationCommandRegistries: Initializing...
[INFO] ApplicationCommandRegistries: Took 61,304ms to initialize.
how to change builder value before it registers?
Hi, i want to add my old builder style language handler (
```ts
const data = (this.builder as CommandBuilder).toJSON();
this.data = localizeData(data, this.client) as CommandJSONBody;...
Solution:
I just realized it, thanks! Is there also the possibility to make language-specific aliases (prefix command)
Paginated message maze error...?
I'm getting a strange message from the
PaginatedMessage class:
```[PAGINATED_MESSAGE_RUNS_IN_NON_PARTIAL_DM_CHANNEL] PaginatedMessageRunsInNonpartialDMChannel: PaginatedMessage was initiated in a DM channel without the client having the required partial configured.
If you want PaginatedMessage to work in DM channels then make sure you start your client with "CHANNEL" added to "client.options.partials".
Furthermore if you are using message based commands (as opposed to application commands) then you will also need to add the "DIRECT_MESSAGE" intent to "client.options.intents"...
PaginatedMessage unknown interaction
Hi, so the idea is I have certain commands that use a paginated message, and I want to log the user's result to my logs channel to check if it's working correctly.
I log command usage in a method like the code below, and I realise my app crashes very frequently with a
DiscordAPIError[10062]: Unknown interaction, especially when i try to navigate the pages myself with the select menu. The node.js process then exits with error code 1.
I suspect that the duplicate pagination (one to the user, one to the logs channel) is causing the issue, so I disabled the logging and I encounter no more crashes....Solution:
This will never work. You cannot have 2 things on 1 interaction like that.
Why log every action of the user and not just the errors though?
Also the process shouldn't exit outright on a simple error. This suggests your error handling is borked. That's a different problem though....
Question about phisherman plugin
Hi! I have a question about phisherman plugin: it is still possible to use it? (because I'v joined the official discord, but it seems to be fully shutdown since last month)
Thanks to the peoples that take time to clarify my doubts 😄...
Solution:
no because to use the plugin you need an api key which as you mentioned you can no longer receive
PassportJS with Plugin API
Hello, i know Discord OAuth is directly available in Plugin API, but i want to add other auth methods like steam.
For that i thought about using passportjs but i don't see a way to use it in combination with plugin api.
Does someone have experience with this and can give me advice? 😄...
what is route?
how to use that?
Solution:
it's part of the API plugin if you want to host a REST api along with your bot, see more details on https://sapphirejs.dev
multiple provided values message command
im attempting to make a message command that is like ?query Username1, Username2, Username3... etc
id need to be able to first get all the usernames into one string and then split it myself by comma and space but how would i get them all to begin with? theres not a set amount of usernames that would need to be provided, ie some people could provide 2, 3 or even just 1....
Unable to catch Zod error
Hi,
I'm creating a container builder system that intakes modal values from a user and attempts to create the selected component.
I am trying to use discordjs's builders to set the data, then run the .toJSON() function, since this will try to validate the builder's data. I wanted to catch this error and notify the user what they need to adjust, however I can receiving this and not sure how to proceed:
...
Command reg
Can I register certain commands globally and some to my guild only?
Solution:
you can use
RegisterOptions.guildIds for your guild specific commands and the commands that don't specify guildIds will be your global commands.
in case your unfamiliar with the register options, it's the second parameter in the registry.registerChatInputCommand and registry.registerContextMenuCommand functions...StringSelectMenu breaks command
Code: https://github.com/tortenworx/truss-bank-pre-release/blob/master/src/commands/accounts.ts
So what happens is that whenever I do the command, with this string select menu, It breaks. Now I narrowed down the problem to the
.addOptions bit. the productsList.map() function somehow breaks it....Solution:
I found out the problem, the description for a string select menu option has a character limit that I was surpassing leading for it to error out without logging
Bot not responding to commands
Github Repo: https://github.com/tortenworx/truss-bank-pre-release
Henlo! So my bot suddenly stopped responding to commands, even with the provided
/ping command on the guide.
I tried rolling back the changes I made, removing listeners and preconditons, but still it is not working....Solution:
Change your module to src/index.ts in package.json instead

integrationTypes & contexts defaults (@sapphire/framework)
The template explicitly defines them for the given command, but are those options also the default? Am I free to remove them?
Solution:
The defaults are everything yes
register command per guild
Can i register all commands globally but only one command in only one guild?
Trying to lock a API route behind authentication, having problems authenticating from my web app
So I've read over the SapphireJS documentation on how to lock my bot's API routes behind authentication using an authenticated() decorator like so:
```ts
import { createFunctionPrecondition } from '@sapphire/decorators';
import { HttpCodes, ApiResponse, ApiRequest } from '@sapphire/plugin-api';...