Can I get only id from value?
Here's my code
And in user value it return like
<@1063730517876408381>
this
But I Just want to user id 1063730517876408381
So I tried to using replace But not work..
D:\Project\minecraft\Commission\Illusion\Bot\Illusion\commands\Developer\point.js:34
user = user.replace("@" ,"")
^
TypeError: Assignment to constant variable.
How Can I get only id from that value?11 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
interaction.options.getUser('user').id
I tried it but return
undefined
.addUserOption instead of .addStringOption
Unless you have a specific reason for letting people put whatever stuff they want in the option and have to deal with parsing it
Still return
undefined
Post your updated code
Edit like this
^
ops
I am just stupid
wait a sec
Or
.get("user").value.id
Thank uuu
getUser
this was the prob haha