This commit is contained in:
ItzEmerald committed 2020-07-14 19:17:40 +01:00
1 parent 17c49b2b03
commit e3576b17b1
14 files changed
+145 -49

No files matched your search

+13 -10
View File
@@ -9,21 +9,24 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
module.exports = {
name: supportbot.RemoveUser,
description: supportbot.RemoveUserDesc,
execute(message, args) {
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.RemoveUser}!`);
let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.Staff);
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(":warning: **Err!** You do not have the correct permissions to use this command.")
.setColor(supportbot.WarningColour)
message.channel.send({ embed: NoPerms });
let SupportStaff = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.Staff);
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
.setColor(supportbot.ErrorColour)
if (!message.member.roles.cache.has(SupportStaff.id))
return message.channel.send({ embed: NoPerms });
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
const Exists = new Discord.MessageEmbed()
.setTitle("Incorrect Channel")
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
.setTitle("No Ticket Found!")
.setDescription(`${supportbot.NoValidTicket}`)
.setColor(supportbot.WarningColour);
message.channel.send({ embed: Exists });
@@ -33,7 +36,7 @@ module.exports = {
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
const UserNotExist = new Discord.MessageEmbed()
.setTitle("User Not Found!")
.setDescription(`:x: **Error!** This user doesn't exist, Are they in this server?\n\nTry Again:\`${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>\``)
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>\``)
.setColor(supportbot.ErrorColor)
if (!rUser) return message.channel.send({ embed: UserNotExist });
@@ -47,7 +50,7 @@ module.exports = {
const Complete = new Discord.MessageEmbed()
.setTitle("User Removed!")
.setDescription(`👍 ${rUser} has been removed from this ticket`)
.setDescription(supportbot.RemovedUser.replace(/%user%/g, rUser.id))
.setTimestamp()
.setColor(supportbot.EmbedColour)
message.channel.send({ embed: Complete });