Sapphire - Imagine a framework

SIA

Sapphire - Imagine a framework

Welcome to the Sapphire Discord server! The next-gen object-oriented Discord.js bot framework can be found here.

Join

sapphire-support

discordjs-support

old-sapphire-support

old-discordjs-support

old-application-commands-and-interactions

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

Duplicate Tasks

Hello, I'm using @sapphire/plugin-scheduled-tasks on my bot and have configured a paterne to run the task every 10 seconds When the task reaches 0 seconds, the run() function is called 2 times Here's my code and a screen to help you understand:...
No description

Listener with `once: true` appears to be triggering multiple times

```ts import { ApplyOptions } from '@sapphire/decorators'; import { Events, Listener } from '@sapphire/framework'; import { ChannelType } from 'discord.js'; import { DBMessageLogs } from '../lib/database/DBMessageLogs';...

remove command from command registry after renaming a command file

How do I do this? Initially I had this command called ping, but renamed it to latency. I want to remove the 3 ping commands from the registry.
No description

Build sapphirejs typescript project?

I'm new to sapphire and I am following the official guide on the website. However it only shows a file structure of JavaScript files. How can I set up the project to build using tsc?

Modal Validation String Primitive

I'm receiving an error when trying to display my modal. I've tried following the docs but may be missing something. I tried using this answer because it looks like the exact same issue but my modal does have a title. https://discord.com/channels/737141877803057244/1122637599933223002/1122759262716842006 Error: https://pastebin.com/vF6YKkMv...

Advanced Help Command

So i'm trying to make a help command where it will only show in an embed the commands that the user that ran the command can ran, so for example, a staff member will see all staff commands + all public commands, the bot owner will be able to see dev commands + all commands, and a normal member will only be able to see public commands, etc, how would I do something like this?

TypeError: Cannot read properties of undefined (reading 'client')

Full Error:
TypeError: Cannot read properties of undefined (reading 'client')
at Object.handleError (C:\Users\cmart\Desktop\Discord Bots\Sapphire\src\utils.js:129:36)
at WarningsCommand.messageRun (C:\Users\cmart\Desktop\Discord Bots\Sapphire\src\commands\Moderation\warnings.js:96:27)
TypeError: Cannot read properties of undefined (reading 'client')
at Object.handleError (C:\Users\cmart\Desktop\Discord Bots\Sapphire\src\utils.js:129:36)
at WarningsCommand.messageRun (C:\Users\cmart\Desktop\Discord Bots\Sapphire\src\commands\Moderation\warnings.js:96:27)
...

messageCommandDenied

is it ok to delete this file, would something happend? I don't use it in any of my commands, most of my preconditions use: ```js } else { message.delete().catch((err) => console.log(err));...

i18n not part of sapphire container

Hello guys, I just updated my i18n plugin to the latest version (5.1.0) and noticed that since version 5.0.5 i18n seems to not be a piece of the container anymore. I try to access the piece with...

Command.ChatInputCommandInteraction GuildMember.voice not updating

```ts public async play(interaction : Command.ChatInputCommandInteraction) { const interactionGuildId = interaction.guildId; const member = interaction.member as GuildMember;...

Unsync slash commands

Is there a way to delete previously synced commands. I have some slash commands created in the past with this bot, I have now deleted those commands (their files), but on the discord server, they are still there, and I can still call them, they don't work i get Invalid interaction application command which is fine, but I dont want them there.

Error [EMPTY_MODULE]: A compatible class export was not found.

Not sure what's causing this error Here is my code and file tree ```bash └───src ├───apis...