let fUser = message.guild.member(message.mentions.members.first() || message.guild.members.cache.get(args[0]))
if (!fUser)
return message.channel.send("Please put a valid member or a user ID for me to strike").then(msg => msg.delete({ timeout: 8000 })).catch(console.error);
How can I like ban someone using their id cause currently how my user variable is setup is it only allows me to ban them by mentioning but I want to be able to ban them by ID instead the only way I can do that right now to replace "user" with their id like this <@716382720917372998>.
But I just want to put in there raw ID and it works out.
In order to ban a user by their ID you have to do the following :
const member = message.mentions.members.first() || await message.guild.members.fetch(args[0]);
Here the member variable is an GuildMember so you can just do member.ban() to ban them.