Code js
For code discord bot
code ban v12
client.on("message", message => {
if (message.author.bot) return;
if (!message.member.hasPermission("BAN_MEMBERS")) return;
if (message.content.startsWith(prefix + "ban")) {
let args = message.content.split(" ")
if(!args) return message.reply('**Please Mention**')
let reason = message.content.split(" ").slice(2).join(" ")
if(!reason) return message.reply("**Write Reason For Ban Member**")
let user = message.mentions.users.first() || message.guild.members.cache.get(args[1])
if(!user) return message.reply("**I cant Find Member**")
const emb = new Discord.MessageEmbed()
.setThumbnail(message.guild.iconURL())
.setTitle("Done Chek Has Been Baned✅")
.setDescription(":white_check_mark: banned from the server! :airplane:")
.addField("**Member Baned**", user)
.addField("**Moderation**", message.author.username)
.setFooter(`Requested | ${message.author.tag}`, message.author.avatarURL())
.setTimestamp()
message.channel.send(emb)
message.guild.member(user).ban({reason: reason})
}
});
code kick v12
client.on("message", message => {
if (message.author.bot) return;
if (!message.member.hasPermission("KICK_MEMBERS")) return;
if (message.content.startsWith(prefix + "kick")) {
let args = message.content.split(" ")
if(!args) return message.reply('**Please Mention**')
let reason = message.content.split(" ").slice(2).join(" ")
if(!reason) return message.reply("**Write Reason For Kick Member**")
let user = message.mentions.users.first() || message.guild.members.cache.get(args[1])
if(!user) return message.reply("**I cant Find Member**")
const emb = new Discord.MessageEmbed()
.setThumbnail(message.guild.iconURL())
.setTitle("Done Chek Has Been Kickef✅")
.setDescription(":white_check_mark: Kicked from the server! :airplane:")
.addField("**Member Kicker**", user)
.addField("**Moderation**", message.author.username)
.setFooter(`Requested | ${message.author.tag}`, message.author.avatarURL())
.setTimestamp()
message.channel.send(emb)
message.guild.member(user).kick({reason: reason})
}
});