I want to make it so when i execute the command without pinging or using the ID of the person it will show the userinfo of the person using the command.
You will have to check message.mentions.members.first(). If it's undefined then use the message's author - message.author.
But it's hard to help and give suggestions without showing us what you have made so far.