Sapphire - Imagine a Framework

SIA

Sapphire - Imagine a Framework

Sapphire is a next-gen object-oriented Discord.js bot framework.

Join

sapphire-support

discordjs-support

old-sapphire-support

old-discordjs-support

old-application-commands-and-interactions

discord.js has no exported member named 'APIMessageActionRowComponent'

i think there is a pull request opened to fix this issue but idk if it's already fixed yet or not. So, im getting this known error when i do npm run dev on my new typescript bot. anyone know how to fix this? maybe temporarily?...
Solution:
install the latest version of @sapphire/framework (5.3.5) and if installed separately, update @sapphire/discord.js-utilities (7.3.3)
No description

trying to use sapphire with bunjs but my discord bot doesn't answer to anything

trying to use sapphire with bunjs but my discord bot doesn't answer to anything

Sapphire commands not being registered with tsdown/rolldown, but is with TSX

Generated with the sapphire cli
Solution:
goddamn im stupid, chaning main: "src/index.ts to dist/index.js fixed 🤦

Message arguments prefix

If the command pay requires member and amount arguments, and I fail one of them, can sapphire return me in error which argument was required and failed?

tsup production deployment

What is the recommended way to deploy a bot using tsup? The github page says to use npm dev, and then immediately says not to use it in production.

Questions regarding i18next

Hello, so i recently started developing with sapphire and i am currently trying to implement internationalization, but i ran into two issues i couldn't yet find a solution for. 1. Fallback for "invalid languages"...

collector.stop() throw's an error

hi, so i'm not really sure what's wrong here cuz everytime i press the stop button it just throws this error ```...
Solution:
If all you want is to add a label to the default stop button I would recommend you instead do ```ts import { partition } from '@sapphire/utilities'; const [stopActions, otherActions] = partition(PaginatedMessage.defaultActions, action => action.customId === '@sapphire/paginated-messages.stop');...

Workaround for string-store bug

Is there anything I can do to try to work around the https://github.com/sapphiredev/utilities/issues/886 bug? I'm making a bot that plans to use the library heavily

How to send message on a different channel

I'm making a command that sends a message on a different channel, now whenever I try to send messages based on what I can find on google, it doesn't send. here's the paste. https://pastebin.com/6pHH0XmJ...

talking about modularity

I'd like to split my bot into modules wherein that part of the bot just works - internally or externally - depending on how I would love it to run at first. I know this doesn't include the database and all that. Just borderline what's behind and in front of the userbase, so I can seamlessly load that part of the bot when like, for example, I want to release that part of the bot. It's different from versioning but it kinda looks like it. It's just, i want to classify stuff based on its intended use. Main question is: should I make use of sapphire plugin api in this matter?...

Any example of sharded sapphire bot?

^
Solution:
you can use the discordjs internal sharder by setting shards to auto in client options. Unless you have need for an external sharder (which means your bot is like > 10 000 servers) then you're fine with that. Anyway there's a few I think but I wouldnt know which and if they're open source (unlikely tbh)

Command not Registering

So my command isint registering, here is the code ```ts import { Command } from '@sapphire/framework'; export class KycCommand extends Command {...
Solution:
TL;DR: Do not use ts-node, use tsc-watch instead. We very strongly discourage using ts-node because it was never meant to be used for bots. ts-node is designed for REPL purposes. That's short for Read Eval Print Loop....

String schema backwards compatibility

Hi, if I use a string-store schema, add an uint schema as its last property, and I then modify it to be bigger, should it be backwards compatible with every already generated string?

Api not running

hey!, I am trying to create a api. What i have so far: ```ts const client = new SapphireClient({ defaultPrefix: '!',...

Multiple manual tasks

Hello, I am trying to create multiple manual tasks, however the task does not execute. I don't know if I am doing anything wrong, but it just does not run like it should. The terminal says the task is created successfully but never runs after the delay.
No description

Error using User Apps in my bot

I get this error while using a user application cmds ```ts 2025-04-21 14:37:53 - ERROR - Encountered error on event listener "CorePreChatInputCommandRun" for event "preChatInputCommandRun" at path "::virtual::" DiscordAPIError[50001]: Missing Access 2025-04-21 14:37:53 - ERROR - at handleErrors (C:\Users\Tejas\Desktop\Source-Codes\Bots\rudescore\rudescore-rewrite\node_modules.pnpm@discordjs+rest@2.4.3\node_modules@discordjs\rest\src\lib\handlers\Shared.ts:148:10)...

returning different things to a run method

I was wondering if it is possible to return for example, a string to a chatinputrun method and have sapphire know to just reply to the interaction with that string or for example return an object with an embeds property with valid embed json same deal

client permissions failing to resolve in channel

I just upgraded from: DiscordJS 14.8.0 > 14.18.0 Sapphire 4.2.2 > 5.3.3 ...

Some Listeners/All Interaction Handlers not working

Some listeners work some dont. For example, ready listener works and some events work (REST debig and music), but this (screenshot) event doesnt work or some others as well. None of the interaction handlers work (screenshot added in a new message)
Solution:
im gonna add "name" property to every handler and every listener
No description