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

Is it possible to run the same bot multiple times and have them each independently handle commands?

I was wondering if I can just run multiple instances of the same bot and have them handle commands on a per channel basis. Each instance of the bot would have it's own config that tells it what channel it can respond to commands in. I was able to achieve this in discord-akairo (old discord framework) with message commands, but I don't know if this would work with interaction commands....
Solution:
Nevermind. Everything worked perfectly from the start. My own filter feature was making me think no messages were being sent to the second instance's channel. I guess there was an influx of messages all at once in the first instance's channel which made me think it was both instance's messages.

Can't find the template. for buttoninteractionhandler

I used the official CLI guide to generate a buttoninteractionhandler but it says that it cant find a template???
Solution:
I used the official CLI guide to generate a buttoninteractionhandler but it says that it cant find a template???
No description

StringSelect shows error in PaginatedMessage

I've updated the versions to latest and now I see a type error where it expects anything but not ComponentType.StringSelect here's the code for reference https://srcb.in/HpWMA3PaUq...

Augmenting detailed description

```ts export interface DetailedDescriptionCommandObject { usage: string; examples: string[]; extendedHelp: string;...

Set global commands guildIds

Hello, is it possible to set globally the guilds id of all commands, For example when developing, I want commands to be only in one server. thank you in advance...

Snowflake support

Yo (english isnt my native lang) So I am planning to use snowflake id's in my own app, and I decided to use your package (@sapphire/snowflake) because it looks the best one (found it from djs). While researching the snowflake id's, as far as I understand, the worker id is included in the snowflake so there wont be any dublicates. And while I was browsing your code, I saw the options workerId and processId, how to use them? I mean, the backend is just expressjs, without workers or anything, i am planning to run a single instance on vps using pm2, or maybe use pm2 to create workers? so, i know that these options are optional, but still, how to use them? when should i use them?...
Solution:
You should use them if you have multiple processes, for example in a sharded bot

TypeError: isJSONEncodable is not a function

Returns this while registering applications commands and this after a while ``` /home/mooy/projects/13-bot/node_modules/.pnpm/discord.js@14.9.0/node_modules/discord.js/src/structures/MessagePayload.js:202 isJSONEncodable(embed) ? embed.toJSON() : this.target.client.options.jsonTransformer(embed), ^ ...

Cannot access MimeTypes & HttpCodes when verbatimModuleSyntax is enabled in TypeScript 5

I thought api plugin is updated to support TypeScript 5... Should I just use constant for this

Issues importing from shapeshift

I'm trying to use StringValidator from @sapphire/shapeshift but it keeps throwing this error when i start up the bot: ``` import { StringValidator } from '@sapphire/shapeshift'; ^^^^^^^^^^^^^^^...
Solution:
You're supposed to do s.string.url(...), importing s from the package.

Accessing container inside of a decorator

Is that possible to have access to the container inside of a decorator. I'm trying to use it in a createFunctionPrecondition but I'm getting: TypeError: Cannot read properties of undefined (reading 'container')...

Sapphire Paginated Embed

I have a paginated embed which works fine by the way. I just need a way to be able to select one field from all the embed fields and then run a function based on which field was selected via a string select menu. Can anyone please guide me in the right direction?
Solution:
No that's not currently possible. Right now the components are resolved at build, not per page. However there is a WIP PR that will address this so it may come in the future.

This is not working

Nothing is getting logged from this Listener

Bot does not respond

I've made a bot following the tutorial (kinda), and it does not respond at all anymore (image). The code is public and can be found at https://github.com/oriel-beck/application-bot/tree/v4. To start it follow the readme. According to the debug log it's connected and receives the interaction payload....

Dynamic disable Slash Command based on role

Is that possible dynamic enable a slash command for a specify role in a specifically guild?

How to get the resolve a key without a target?

👋 Is there a way to access the locale strings using the i18next plugin passing the language instead of delegate it to the fetchLanguage? I'd love to have the nameLocalizations and descriptionLocalizations on my slash commands coming from the i18n json files. That will make it easy to collaborative translation. Something like:...
Solution:
Use applyLocalizedBuilder 🙂 Exemple: ```ts import { Subcommand } from '@kaname-png/plugin-subcommands-advanced';...

creating slash commands

i tried to generate a slash command with cli bot it did not register

No auth data in the request after exchange the Discord code

👋 I'm fowling the built in Oauth2 route documentation but, every time that I fire a request after authenticate I have a null value in the request.auth on the backend side. Here is my frontend code for exchange the Discord code ```ts...

Listeners won't fire up nor slash commands would register in the guild

I created a new bot and now the listeners won't fire up although the bot seems to be online? nor the commands get registered although it shows this

PaginatedMessage extended with editing the select menu options does not work as expected

I am readjusting certain things from my old class to that of @sapphire/discord.js-utilises I have noticed that my old class works as expected but this one does not, it adds another option and if I click it it gives an error new method for the current class: https://srcb.in/Hr0PPd6c7U ...

MessageCreate listener not working as expected

https://github.com/MRDGH2821/Perpetual-Mechanical-Array-Bot/tree/2f7644c2d0d9ebc75ff11ef27f7cc70a33476b70/src/baseBot/listeners/AutoResponse I have some listeners inside this folder, their primary job is to respond to trigger texts (for eg sending FBI word in any text channel will send a random FBI gif in that channel) But for some reason none of them are working....