Banning users using user ID discord.js
I'm kinda new to coding discord bots and I have a problem. I want to have a ban command that would ban the mentioned user in the command or the user that has an ID that was provided in the command. For example: &ban @User#0001 would ban User#0001 but if the command looks like this: &ban 123456789123456789 (let's say that's the ID of User#0001) it would still ban User#0001 (as it is the user's ID). I have this code, it works if I mention the user, but it doesn't work if I enter the ID. const Discord = require('discord.js'); module.exports = { name: 'testban', description: "Executer will ban the
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.