Sapphire - Imagine a Framework

SIA

Sapphire - Imagine a Framework

Welcome to the Ruby Discord server! Finally split off from the Sapphire bot.

Join

sapphire-support

discordjs-support

old-sapphire-support

old-discordjs-support

old-application-commands-and-interactions

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@[email protected]\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

Running into issues with registerApplicationCommands

So I am running into an issue with registerApplicationCommands, for some reason it happens only when the SlashCommandBuilder has Subcommands or Group of subcommands. I console logged the data of the SlashCommandBuilder but still same problem. Edit: I extended the Subcommand class to my own liking and added automatic Builder creating upon creating the class within commands. I'll add the screenshot at the bottom cuz i forgot to show it...
No description

Plugin-API Param question

Does the plugin-API nolonger support transcript/:id style routes? ```typescript import { ApplyOptions } from '@sapphire/decorators'; import { Route, type RouteOptions } from '@sapphire/plugin-api';...
Solution:
Always look for a changelog file or releases page on github when updating to a new major version. Major versions always imply some breaking changes https://github.com/sapphiredev/plugins/blob/main/packages/api/CHANGELOG.md#sapphireplugin-api700---2024-11-02. Learn more about semver here: https://semver.org

PaginatedMessage to fetch data on demand

Is there an example on how to make a PaginatedMessage fetch data for a page when it is called? I dont want to get all the data from the db at once since its too slow.

Commands `status-rewards` and `status-rewards-admin` don't register on Discord

I believe everything is done correctly, have the registerApplicationCommands method implemented. Both show up in debug logs that they are registered, yet don't show up on discord.
No description

interactionCreate listener

``` import { Listener } from '@sapphire/framework'; export class UserEvent extends Listener { constructor(context, options = {}) {...

Creating a decorator

I have this decorator here: ```ts export function TemplateAutocomplete(): ClassDecorator { return createClassDecorator((target: Command) => createProxy(target, {...

Question About Sapphire API

Is Sapphire plugin api can be used only for callback? for example. I want to make API for callback payment gateway that my bot will receive and confirm the payment from the user that has been successfully pay the product that i sell, and i send the the product to the DM

DetailedDescriptionObject

Hello, I'm almost 100% sure that this is a bug
Next