- What's your exact discord.js
npm list discord.jsand nodenode -vversion? - Not a discord.js issue? Check out #1081585952654360687.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
✅Marked as resolved by OP
#Discriminator turns into "0"
85 messages · Page 1 of 1 (latest)
thats intentional behavior
users who migrated their username do not have a discriminator anymore
no
only those who have not migrated their username will still have a discriminator
otherwise it will return 0
so do that
replace discriminator with username
yes
If they have a discriminator isn’t their username just their normal username+ discriminator?
^
John#0001
Is actually
John0001
Ah okay
unless discord does that automatically if they didnt choose anything
I just figured that since when you look at a user who has not changed it displays as such
whats "it"
can you show your code? i can't guess what you're doing
wdym it says tag?
Just to ask what is output look like
User#displayName
The global name of this user, or their username if they don't have one
Your display name is Trumbus and username is trumbus__
please read the docs
what?
i just showed you
use displayName instead of username
great
do you need any more help?
if not, please press Mark as Solved at the top of the thread
#how-to-get-help
having an interactionCreate without actually having slash commands registered doesnt magically make them work
you need to register them and then respond accordingly
are you responding to the interaction
What is your error?
again, i can't guess what you're doing. please look at #how-to-get-help
thats not an error
are you responding to the interaction
Code?
you defined interaction as another variable
you need to destructure commandName from interaction
Destructuring assignment
The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.
a class does not equal a string
that's not what you were supposed to do
do you know javascript?
and GuildMember.tag doesnt exist
ill ask again, do you know javascript
okay then im going to direct you to #resources. using discord.js requires solid js knowledge because otherwise you will have simple errors like this
And we’re not being mean we’re just saying that it will be much easier if you try and learn as much js before stepping into discord.js
well i did help you
you just dont seem to understand anything we're telling you
its so simple
const { commandName } = interaction;
^
^
This is the same as
const commandName = interaction.commandName
It’s nice to destruct it because you can do many variables at once
I also think it looks nicer but that’s just preference
Make sure you read the guide it really helps and is fairly beginner friendly
That’s fine global registration takes some time though remember that
not anymore
Really that’s nice
do you need any more help?
Suggestion for @native reef:
Creating Your Bot: Registering slash commands
read more
you will become rate limited if you register on every restart
? use words please
it doesnt matter
Yeah you should only register your commands separately when you make changes or add commands
I don’t even have it part of my bot so I just run it when I need to
Should also move away from prefix commands in my opinion
No I think he is saying he has a prefix command that registers his slash commands
^
if not, please mark the thread as solved