I'm trying to get a user object from a message (specifically a command) - example:
$info Account#0001
Sometimes Discord doesn't register the member (probably to save memory in servers with a large amount of members) so you can't @ them and get the user object when they're out of the channel. I'm trying to make the bot search for that one member#tag, get their ID and then it does whatever the command does.
I've tried
message.mentions[0].id
however it only works whenever the user is pinged, any ideas?