Discriminator turns into "0"
i am using the propierty
message.author.discriminator
, but it gives me an "0" of response. Here are some helpful screenshoots107 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- 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 OPUnknown User•10mo ago
Message Not Public
Sign In & Join Server To View
wat
huh
but
haves an tag, no?
and
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
i wanna do to send the username with no mention
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
how
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
its a string?
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
If they have a discriminator isn’t their username just their normal username+ discriminator?
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
John#0001
Is actually
John0001
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
Ah okay
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
lets test
I just figured that since when you look at a user who has not changed it displays as such
it says tag
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
and i dont want that
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
ye
Just to ask what is output look like
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
my username is Trumbus and its says trumbus__
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
Your display name is Trumbus and username is trumbus__
some tests xD
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
i can type displayName
?
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
idk what to type on code
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
^
That will output Trumbus instead
thats wat i want
and it worked
it does
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
slash commands
it doesnt work
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
and i have an interactionCreate
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
i have regisetred
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
What is your error?
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
No-Response
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
Code?
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
:mdn: 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.
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
i deleted the definition
of
commandName
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
wat i need to do
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
desestructure
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
no much
i am new
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
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
that no help
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
im gonna try other think
i have a code, that it uses that code
if i copy of that
i can get a good code
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
^
i never think of
{}
was my faultUnknown User•10mo ago
Message Not Public
Sign In & Join Server To View
This is the same as
const commandName = interaction.commandName
It’s nice to destruct it because you can do many variables at oncelets try now
I also think it looks nicer but that’s just preference
the slash works
Make sure you read the guide it really helps and is fairly beginner friendly
yes
i register globally the slash
now works
That’s fine global registration takes some time though remember that
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
Really that’s nice
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
i registered
with this code
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
?
i used that code
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
on other bots
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
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
i can use a prefix command to that?
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
Should also move away from prefix commands in my opinion
use a prefix command, to use the code for registering slash commands
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
No I think he is saying he has a prefix command that registers his slash commands
^
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
^
nah
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
i gotta mark now
this thread haves so much messages