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

CommandStores not showing commands in order

I just finished the rewrite of a bot, tested the help command and looks like the commands are not showing in order, just tested on the Development bot and they are in order, this doesn't cause any issues but I want them to show correctly, any idea? Could be a host issue?
Solution:
this.container.stores.get("commands").sort((a, b) => a.name.localeCompare(b.name))
this.container.stores.get("commands").sort((a, b) => a.name.localeCompare(b.name))
...

Unable to resolve signature of class decorator when called as an expression.

right after creating a command with sapphire-cli in typescript , the decorator ApplyOptions returns a error The runtime will invoke the decorator with 2 arguments, but the decorator expects 1. is there any workaround for this ?...
Solution:
Enable the experimental decorator option in tsconfig I think
No description

Type safe Slash Commands Options ?

Hi there, I can't seem to find a way to add Type Safe options to a Slash command. See Example: ```ts public override registerApplicationCommands(registry: Command.Registry) { registry.registerChatInputCommand((builder) =>...

correct way of formatting the bot's uptime

tried with this but it doesn't return the correct uptime
formatter.format(this.container.client.uptime * 1000);
formatter.format(this.container.client.uptime * 1000);
...
Solution:
https://github.com/favware/dragonite/blob/main/src/commands/System/info.ts#L167-179 My bad I misread. Anyway you don't need time utilities for uptime. Just use discord native timestamps. Much much better and much much easier....

ExpectedValidationError from EmbedBuilder().setTimestamp(variable)

(using typescript) while creating an embed in an interaction handler and setting the Timestamp on it, the following Error(s) are thrown ```ts CombinedError (3) Received one or more errors ...
Solution:
classInstance.createdAt is a string

PaginatedMessage, Actions

I am trying to create a paginator with multiple pages (embeds) and so to paginate i want to use buttons ```typescript const paginator = new PaginatedMessage({ template: new FlanticEmbed().setFooter({...
Solution:
fixed it

Issue with Sapphire Update

error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node16'. TS Config ```json {...
Solution:
Update to @sapphire/ts-config v5 and follow the upgrading guide

Subcommands, and CommandGroups/SubCommandGroups

Hey!, I was wondering whether it's possible to create subcommands and groups with sapphire i.e ?automod enable -> enable is part of the automod command group ?automod ignore reset -> ignore is part of the automod command group and reset is part of ignore subcommand group ...

Precondition error

Precondition: ```js const { Precondition } = require("@sapphire/framework"); class DMPrecondition extends Precondition {...

Context Menus not running

When I try to execute a Context Menu, it says "The application did not respond", no errors in console

requiredClientPermissions check always resolving

I tried to get command denied by permission check, but check always been passed. I think problem appeared after this pr https://github.com/sapphiredev/framework/pull/616 . While try to resolve this problem i commented this lines and finally i get correctly missing permissions [ 'BanMembers', 'EmbedLinks' ]. Tested in TextChannel. ```json...

PreMessageCommandRun Event

Is there a way of stopping the command from running as I've tried everything and nothing works

error command sh -c node-pre-gyp install --fallback-to-build

When attempting to run npm i after cloning my bot repo, I get this error. I am currently using Ubuntu 22.04 (LTS) and Node.js 18.17.1 (LTS). This is a fresh install. Below are the relevant logs. https://pastebin.com/2Q3WPWQf...

reload all commands

to reload all commands is it CommandStore.load() or CommandStore.loadAll(), also how much time does it normally take to reload all commands

built-in feature

does sapphire has any built in feature to update the commands without restarting the bot

start up message

any way of removing these logs on start up: [INFO] ApplicationCommandRegistries: Initializing... [INFO] ApplicationCommandRegistries: Took 1ms to initialize....

PaginatedMessage replies "This maze wasn't meant for you...what did you do."

i put the example for paginated messages in my slash command, but instead of sending a paginated message, it only replied with the above error message and logged a warning after following the advice of the warning by adding the CHANNELs partial, it still replied with the same message, but without logging a warning...
No description