Ask coding questions

← Back to all posts
basic Discord bot help
Mathman05 (1)

I have a username example#1234 how would I turn that into a user object?

Answered by Coder100 (16898) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (16898)

You can't just get a user by username, they have to be in your server, aka guild.

Mathman05 (1)

@Coder100 they would be in a discord server that I know of I have their tag but not their user object.

Mathman05 (1)

@Coder100 also removing the .id from the end just gives you the user :D

AndrewMarkarian (19)

You can use a person´s name and tag, you need their id. Like 80000000000000000

Mathman05 (1)

*node.js discord bot