Commands not working

Aacronie12/25/2022
I created a command and it won't work.
Solution:
We didn't write the guide for it to be blatantly ignored
Jump to solution
Aacronie12/25/2022
I created a command the bot would initialise and start but I don't think so the commands are being loaded it doesn't work with a default prefix i am initialising it with @bot command works
SSpinel12/25/2022
Tag suggestion for @Acronie: When asking for help, make sure to provide as much detail as possible. What have you tried so far? Do you have stacktraces that you can show us? What are you trying to achieve? Try to answer these questions and others, so we do not have to ask for them afterwards.
❯ For a good guide on how to ask questions, see the instructions that StackOverflow gives. You should try to always follow these guidelines. ❯ For an excellent video that shows how not to ask technical questions is this, watch this YouTube video by LiveOverflow. ❯ Asking technical questions (Clarkson)How to ask questions the smart way (Raymond)
2412/25/2022
Uhg What's the stupid tag for sapphire support questions
SSpinel12/25/2022
- Did you use a folder of the examples repository or did you use the CLI to generate your bot? - What's your file/folder structure? - What's your "main" property in package.json - Are you using TypeScript? And if so, how are you compiling and running your code? - Are you using the version 2 or version 3 of @sapphire/framework? - In case you are using version 3 of @sapphire/framework, and your problem related to message commands, did you add loadMessageCommandListeners to your SapphireClient options Remember that if you are new to @sapphire/framework it is important that you read the user guide.
2412/25/2022
Yes that thanks
SSean12/25/2022
regular-problems ftw
2412/25/2022
Dumb name
Aacronie12/25/2022
import { SapphireClient } from '@sapphire/framework'
import { config } from 'dotenv'
config()

const client = new SapphireClient({
intents: ['GUILDS', 'GUILD_MEMBERS', 'GUILD_MESSAGES', 'GUILD_VOICE_STATES'],
defaultPrefix: '.',
loadMessageCommandListeners: true,
})
client.login(process.env.BOT_TOKEN)
import { SapphireClient } from '@sapphire/framework'
import { config } from 'dotenv'
config()

const client = new SapphireClient({
intents: ['GUILDS', 'GUILD_MEMBERS', 'GUILD_MESSAGES', 'GUILD_VOICE_STATES'],
defaultPrefix: '.',
loadMessageCommandListeners: true,
})
client.login(process.env.BOT_TOKEN)
loaded the messgeCommandListeners
Aacronie12/25/2022
file structure is fine too
Aacronie12/25/2022
"main": "dist/index.js", main too and using tsc-watch which is fien too
SSean12/25/2022
Do you have the message content intent in the dev panel? (Its a priviledged intent)
Aacronie12/25/2022
yes it works @bot command but not with the default prefix
SSean12/25/2022
Discord gives the bot the message content regardless if you ping it, so it not working suggests that it doesnt have the message content intent
Aacronie12/25/2022
No i am saying the command works when I ping it and use the command so it has the message content it doesn't work when I use the prefix .command
SSean12/25/2022
If you ping the bot or it has the priviledged intent it gets message content, otherwise it does not You need to flick the switch on the developer panel
Aacronie12/25/2022
oh works thanks also is their any help with reactions as I am using the old message thingy I wanna use reactions is it available in the framework>'
FFavna12/25/2022
Wdym old message thingy and use reactions. Do you mean buttons? Anyway the framework supports everything that djs does, and djs supports buttons
Aacronie12/25/2022
Do you mean buttons
not buttons normal reactions isn't buttons limited to the slash commands?
FFavna12/25/2022
No
SSean12/25/2022
No
Aacronie12/25/2022
oh icc didn't knew that
FFavna12/25/2022
And reactions have been around for like 7 years. Literally longer than sapphire even exists. Ofc it supports them.
Aacronie12/25/2022
I didn't mean "support" I meant like some util functiins to make it easier and I have to write less code 😛
SSpinel12/25/2022
@sapphire/discord.js-utilities
Discord.js specific utilities for your JavaScript/TypeScript bots ❯ Author: sapphiredev ❯ Maintainers: favna, kyranet, and vladfrangu ❯ Latest version: 5.1.2 ❯ License: MIT ❯ Date Created: <t:1609519287:d> ❯ Date Modified: <t:1671410032:d> Dependencies: @sapphire/discord-utilities, @sapphire/duration, @sapphire/utilities, and tslib
Aacronie12/25/2022
Do buttons go in /buttons in file tree
SSpinel12/25/2022
Documentation suggestion for @Acronie: <:_:746069730170896405> Sapphire guide results: Interactions Handlers / Buttons
Aacronie12/25/2022
doesn't say anything ;p
FFavna12/25/2022
It does
SSpinel12/25/2022
<:_:746069730170896405> Sapphire guide results: Interactions Handlers / What are they?
FFavna12/25/2022
You could try and bother clicking around
Solution
FFavna12/25/2022
We didn't write the guide for it to be blatantly ignored

Looking for more? Join the community!

Want results from more Discord servers?
Add your server
Recommended Posts
Can't register application command.I have followed docs here to create ping command but when using slash there no my app ping command. Varying parsing options?With slash commands, is it possible to have a varying input option depending on a condition? Say thCustom Arg - ResultError Unwrap failedThis seemed to be working for me in a previous version of Sapphire - but I've only recently gotten babout argscan help me about this?How do I apply preconditions to a specific subcommandI’d like to only apply my `OwnerOnly` precondition to certain sub commands instead of all of them. ISapphire preconditions args errorWhen ever I try to run a precondition, I get this, any ideas on how to fix it?Custom prefixHow can i implement custom prefix per guild i already have my command which is >prefix <new_prefix> Handling argument autocomplete per commandWould it be possible to handle autocompletes through the Command class itself instead and it will beWeird error when installing ts-configimage includes the errorDo Partials Create Un-Typesafe Code?If I am listening for say a message update event with partials of messages and I receive a partial mAPI error event handlerHi, when I get a DiscordAPIError through the logger that starts like this: ``` Encountered error whiLocalizations for slash commands working partiallyI'm trying to utilize i18next-plugin for registering slash commands using Discord's localization, bui18next plugin without namespacesHello, how would I get rid of the namespaces, and have it like this? I get invalid language providedUnknownMessageCommandName event is not workingSo i was making the event but when i run >pinewfweew for example or any other wrong command nothing can i edit the frame work to apply custom commands or not.So i want to edit the frame work to make it able to handle custom commands i am using mongo db for ti got a bunch of typescript errorslook at the pictureEmbed PaginatorMay i ask something about embed paginator? it works when i doesnt send my message as ephemeral but wGetting ChannelType from APIInteractionDataResovledChannelI'm currently trying to work with chat input commands. And when I create an channel option and use `idk what to title this.. trouble shooting? im new to all of this hahaTrying to make a /role command with options that on different slected options it either adds or remointeractionHandler parse showing TS '...cannot be named without reference to...' errorWhen attempting to make a very basic interaction handler I'm getting the pictured compiler error. Th