NOT WORK SAPPHIRE

why not work bot commands?
Solution:
why not work bot commands?
Jump to solution
28 Replies
kyra
kyra2y ago
You say it doesn't work, but like, what even is not working?
Efraim
EfraimOP2y ago
normal commands not work reply
kyra
kyra2y ago
What's the code? What's the error?
Auric
Auric2y ago
interaction or message commands?
Efraim
EfraimOP2y ago
intera and message are not working code err not reply console
Sean
Sean2y ago
what's your file structure and main property set to?
Efraim
EfraimOP2y ago
i have use extending container
Efraim
EfraimOP2y ago
Efraim
EfraimOP2y ago
i
Efraim
EfraimOP2y ago
package versions latest it is have in problem? i have only slash commands use in bot
Sean
Sean2y ago
I mean the main property in package.json lol but also that looks like a command setup for a message command not a slash command
Efraim
EfraimOP2y ago
Efraim
EfraimOP2y ago
i know bro it example msg .. slash review also teaching time answer an essay nodejs version? v18.14.2 i have node v
Sean
Sean2y ago
that's fine
Efraim
EfraimOP2y ago
pepeFeelsBadMan
Efraim
EfraimOP2y ago
Sapphire Framework
Using and extending container | Sapphire
The container is a way in which Sapphire achieves Dependency Injection. This is a very useful feature, since it
Efraim
EfraimOP2y ago
commands not worked
Favna
Favna2y ago
match these
Favna
Favna2y ago
and you should enable loadMessageCommandListeners when using message based commands https://www.sapphirejs.dev/docs/Documentation/api-framework/interfaces/SapphireClientOptions#loadmessagecommandlisteners
Favna
Favna2y ago
that page isnt even really relevant to using commands. Refer to the getting started pages first before going to additional information. i.e. https://www.sapphirejs.dev/docs/Guide/getting-started/creating-a-basic-command
Sapphire Framework
Creating a basic command | Sapphire
In order to start registering commands you need to create a subdirectory called commands (lowercase!) in your entry
Efraim
EfraimOP2y ago
this code not work bro
Efraim
EfraimOP2y ago
"commands" folder not check working
Efraim
EfraimOP2y ago
i transing main file
Efraim
EfraimOP2y ago
now use this is working it this code container not work I have the old version works, but in the new sapphire version (latest) it creates a problem, it does not run the commands. how can i make it just use as slash?@Favna so that it won't run with prefix?
Favna
Favna2y ago
I can guarantee it does work when used correctly
Favna
Favna2y ago
we have extensive guides for setting up slash commands and there's even more info on https://discordjs.guide and https://discord.dev and you can also refer to other open source bots for code examples
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
Discord Developer Portal
Discord Developer Portal — API Docs for Bots and Developers
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Spinel
Spinel2y ago
Discord bots that use @sapphire/framework v4 - Official Bot Examples ᴱ ᴰ ᴶˢ - Archangel ᴱ ᴰ - Dragonite ᴱ ᴰ - Radon ᴱ ᴬ Discord bots that use @sapphire/framework v3 - Arima ᴱ - Nino ᴱ ᴰ - Operator ᴱ ᴬ ᴰ - Sapphire Application Commands Examples ᴱ - Spectera ᴬ Discord bots that use @sapphire/framework v2 - Materia ᴱ - RTByte ᴱ ᴬ - Skyra ᴬ ᴰ - YliasDiscordBot ᴬ : Uses ESM (if not specified then uses CJS) : Advanced bot (if not specified it is a simple bot, or not graded) : Uses Docker in production ᴶˢ: Written in JavaScript. If not specified then the bot is written in TypeScript.
Efraim
EfraimOP2y ago
I will use it by watching it now thanks 😦
Want results from more Discord servers?
Add your server