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

Can't type custom precondition (?)

Hey, I created custom precondition, but my type overriding seems to dont work?
No description

how can i create modal and show to user

hello how can i show modal to user i now build one modal and cant show to user

Cooldown

When I set a command cooldown it doesn't seem to send a error message?

Listeners not working at all

So I've been having this issue recently, none of the listeners on the listeners folder seem to work and I can't find a reason that would cause this to happen. My folder structure is: ``` src/...

Why in line 79 for src/preconditions/ClientPermissions.ts is there `PermissionsBitField | null`?

Hello, I'm doing some (potentially bad, please warn me) things to be able to check permissions whenever I need it in my bot. I figured to have sane code, I'd copy off of Sapphire's precondition code for myself to use, specifically ClientPermissions. As far as I know, if I want localization and sane control over the message text when there's a permission error, and the permission check can be done anyway, I'm guessing this is how I do it. While looking through the code, I noticed the explicit type cast PermissionsBitField | null. I also noticed this could be avoided, assuming the types weren't lying to me from channel.permissionFor(me)....

args.pick issue

Code: ```js if (check) { user = await args.pick("member").catch(() => message.member.user); console.log(user);...

Sapphire not saving the changes for reaction role messages

I make the message and then after a bit it reverts back. removes the image and the title.
No description

Using bun with @sapphire/framework

Hello, I'm trying to get my discord bot to run using bun, but when I try running my code I get theses errors : ``` Error when loading 'undefined/CoreGuildNewsThreadChannel.js': ...

Arguments Issue

. So looks like inside the if the user is null because sapphire is taking it like the third argument I think, how can I fix this?...

Sharding Error

I get the following error: Error: NO CHILD/MASTER EXISTS OR SUPPLIED CLUSTER_MANAGER_MODE IS INCORRECT it comes from this line: shards: getInfo().SHARD_LIST,...

i18n applyLocalizedBuilders Options

I saw in the method parameters one for options. How do I pass them? ```js applyLocalizedBuilder( builder, ...

Set Prefix Tutorial? I'm bad at JS

I used this event below to check for bot prefix then no prefix exist. The question is how to set bot prefix as documents on website said there was a page about it but i can't found it ``` const { Listener } = require("@sapphire/framework");...
No description

Question about cooldowns

Is the a way to make the cooldown show only if the same user is provided? Example: Someone starts spamming, 2 mods see it and use the warn command, which would result in 2 warnings for the same user, which should only be 1...

Command `admin.ts` not being registered in the command registry

This is the error message I am receiving when I run the bot: Encountered error while handling the command application command registry for command "admin" at path "~/dist/commands/admin.js" ExpectedConstraintError > s.string.lengthGreaterThanOrEqual this is what the admin.ts looks like: ```ts ApplyOptions<Command.Options>({ name: 'admin',...

Question

https://www.sapphirejs.dev/docs/Guide/preconditions/reporting-precondition-failure Using this, how can it know if the preconditions error comes from the cooldown precondition...

i18n options are not considered

Hi, While I try to refactor my code I want to implement the i18n plugin the way it is intended. When I call the resolveKey() method i18n wont consider my passed options....

i18n format issue

Hello guys, I just updated to the newest version of i18n plugin. My format function is now throwing an error I cannot get much context out of:...

Issue with pnpm (A type annotation is necessary)

The inferred type of 'parse' cannot be named without a reference to '.pnpm/@sapphire+result@2.6.4/node_modules/@sapphire/result'. This is likely not portable.A type annotation is necessary.ts(2742) I saw this error before but how can I fix it. I don't want to switch to Yarn. I have set this line, but this is not helping ...
No description

fetchPrefix method on SapphireClient class

This method doesn't support an array of prefixes, right?