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 (18123) [earned 5 cycles]
View Answer
Coder100 (18123)

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 (21)

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

Mathman05 (1)

*node.js discord bot