sapphire-support
discordjs-support
old-sapphire-support
old-discordjs-support
old-application-commands-and-interactions
Preconditions in Interaction Handler
Difference with dev and prod > The application now has 0 global commands
nodemon src/Bot.ts
- everything works as expected, the bot is online and responsive, with 4 global commands.
When I run my build command tsc
- the build is successful...text command triggered by mentioning bot (no command name)
I want to make a system about module command
Slash command autocompletion dynamic input options
Command#autocompleteRun
can be async, which means you can execute a fetch HTTP request to retrieve the results and show them back to the user.string-store not finding identifiers other than first in Schema on deserialize typescript
id
or cast the value to the correct type to fix this.Why my listener doesn't work?
@sapphire/framework
are you using?
2. What's your file/folder structure?
3. Did you use the CLI to generate your bot?
4. What's your main
(CJS) or module
(ESM) property in package.json
5. Are you using TypeScript? And if so, how are you compiling and running your code? That is to say, what are your build and startup scripts?...my guild related listeners arent firing but my client ones are
Unexspected end of JSON input
const body = await request.readBodyJson();
...Updating paginated message pages while the handler is running
JS Example has error with loading routes
Precondition not triggering "chatInputCommandDenied"
this.error
, however because you're using Array#forEach
which accepts a callback function that returns void
you're not actually returning this.error
for the function chatInputRun
but rather for the anonymous arrow function that is provided to Array#forEach
.
You can solve this by using for...of
instead....Sapphire keeps taking me in circles! Can't access my Dashboard.

multiple idHints for multiple servers

Serializing string-store result inside another schema
string-store
for this. One of the features in my framework is that you can make customIds that refer to commands, kind of like this:
```ts
class MyCommand extends Command {
public async execute(i: ChatInputInteraction, meta: Metadata) {
const bot = meta.getBot();...string-store
data, for starters, it produces strings created by abusing the underlying UTF16 standard, which can lead to very confusing characters... and invisible ones, among which NULL
(\0
), which is often the delimiter character at the end of a string in C (see strlen()
), which... Windows, Linux, and perhaps MacOS as well rely on.
That being said, if you convert the binary to base64, then you'll be able to share it in plain text on Discord more nicely. serialize
returns an instance of UnalignedUint16Array
after all, with some code you can convert it to base64, this should work:const data = store.serialize(/** data */);
const base64 = Buffer.from(data.toArray().buffer).toString('base64');
const data = store.serialize(/** data */);
const base64 = Buffer.from(data.toArray().buffer).toString('base64');
Random date generator
fallback
RequiresGuildContext
is a decorator and decorators inherently will always only work on what they decorate. You can copy the code and add it to your own repo where you then provide a default function for fallback
.
https://github.com/sapphiredev/utilities/blob/bc456c311f273efcb8150d4e33d614c9889c3ed7/packages/decorators/src/djs-decorators.ts#L190-L192...Constantly getting "The application did not respond"
await interaction.reply('bla bla')
. Anytime I try to do something from bulkDelete to sending embeds or creating buttons, I get the thing. Is there anything to try and debug that? Is it possible that my computer is too slow for developing a bot (lmao, it is not that slow though).
Obviously defering doesn't do a thing. At first I thought my code was wrong but sometimes it works, sometimes it doesn't... One thing remains, this damn message telling me it didn't respond.
Maybe there is a problem with how Sapphire handles my commands right now, found somewhere that a command handler could mess things up and take too long to load up the commands so in the meantime, no response......@sapphire/type does not work with Bun
v8.h
(see source code). Because Bun is built on JavaScriptCore (JSC) and not V8, we can't make the internal inspecting part available for Bun even with a Rust rewrite.