Skip to content
Snippets Groups Projects
Commit f9d3a6c5 authored by Levatax's avatar Levatax
Browse files

ban system

parent c73931b6
Branches
No related tags found
No related merge requests found
Pipeline #40 canceled
const Discord = require('discord.js');
const client = new Discord.Client();
exports.run = (client, message, args) => {
let guild = message.guild
let reason = args.slice(1).join(' ');
let user = message.mentions.users.first();
if (reason.length < 1) return message.reply('Can You Try Again And Write A Reason?');
if (message.mentions.users.size < 1) return message.reply('Can You Mention Who I Will Ban?').catch(console.error);
if (!message.guild.member(user).bannable) return message.reply('You Dont Have Permission To Ban This User');
message.guild.member(user).ban();
message.guild.send('The User' + message.mentions.users.first(); + 'Banned From This Guild. Reason:' + args.slice(1).join(' '); ':hammer:')
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
permLevel: 2
};
exports.help = {
name: 'ban',
description: 'Bans User From Guild',
usage: '*ban @user reason'
};
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment