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

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
No description

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';...

Bot don’t work anymore

Guys after 1000 hours of running without any problem, us bot is full down and the logs show 0 commands registered
Solution:
We found it, sorry for the post, the VPS restart during the night and it broke the current build
No description

Error on my program

I am currently following the guide and i got this error that i cannot fix. Can you help me please ?
No description

Customize Piece loading strategy

Hello all 👋 🙂 I would like to customize the strategy by which Sapphire enumerates and loads pieces - specifically Commands, at least to start with. ...

Dev works, prod doesnt

Has anyone experienced commands working in dev, but not prod? The commands just will not be registered
Solution:
try the new version #Announcements

MessagePrompterConfirmStrategy not working with custom emojis

Hey, I'm trying to use MessagePrompterConfirmStrategy and I use custom emojis uploaded to my application, but it won't work. Any fixes?

Subcommand Inquiry

Can i divise subcommands to different files?

events don't work

I created the messageCreate and Ready events, but they are not working, the only thing that happens is the client is setting the commands in SlashCommands. This works normally.
No description

Subcommand error questions

Hello, I have only messageCommandDenied listener where I handle precondition errors. But, when subcommand fails it also shares that listener even tho there is specific listener for that. Probably a bug you should look into
Solution:
The plugin does not overwrite the default command handling (like you did before by overwriting the listener) and the subcommand denied error is thrown at a completely different stage in the processing of the command: https://github.com/sapphiredev/plugins/blob/6664087e0b419adcd9ce9411148793e131dd7c3d/packages/subcommands/src/lib/Subcommand.ts#L437 as opposed to https://github.com/sapphiredev/framework/blob/b1fa79bad64e0a17eadd6db2d77fe14eb77c87f7/src/optional-listeners/message-command-listeners/CorePreMessageCommandRun.ts#L15...

Custom Store not working

Hey guys, I tried myself on writing a custom store ```js import { Piece, Store } from '@sapphire/framework';...
Solution:
specifically plugins dont do this.stores.register(new InfrastructureDiscordServiceStore()) but this.stores.register(this.server.routes) and assign this.server beforehand. They also dont do registerPath which is implied to be join(getRootData().root, nameOfTheStore)

Pre messsage command run help

Hello, I wanted to run permission check before executing the command, returning the error message if failed otherwise continue with coommand. I can't get it to work and I can't understand why

GuildCreate Listener not triggering with Intents?

Hey I've been trying to get this Listener Running and multiple others but none is working... am i missing something?
[GatewayIntentBits.MessageContent, GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMembers]
[GatewayIntentBits.MessageContent, GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMembers]
Those are the Intents im running rn. Thanks in advance...
No description

TypeError: value.replace is not a function

Hi, I'm trying to run my bot on pterodactyl (docker) nodejs 21. I'm getting the error TypeError: value.replace is not a function anyone any ideas? Full error ``` /usr/local/lib/node_modules/ts-node/dist/util.js:62...

error: reading root with @piece

```js constructor () { super({ intents: [ GatewayIntentBits.Guilds,...
Solution:
Sorry. Apparently my Japanese keyboard changed the characters to identical ones and confused part of the code.

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