diff --git a/commands/add.js b/commands/add.js index f9b8d62..3bcd42b 100644 --- a/commands/add.js +++ b/commands/add.js @@ -14,42 +14,32 @@ exports.run = (bot, message, args) => { console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Add_Command}`); - let staffGroup = message.guild.roles.find(staffRole => staffRole.name === supportbot.StaffRole); + let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole); - const rolemissing = new Discord.MessageEmbed() - .setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour); - if (!staffGroup) return message.reply({embed: rolemissing}); - - const donothaverole = new Discord.MessageEmbed() - .setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour); - if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole}); + const rolerequired = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``) + .setColor(supportbot.ErrorColour); + if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired}); const outsideticket = new Discord.MessageEmbed() - .setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`) - .setColor(supportbot.EmbedColour); + .setTitle("Incorrect Channel") + .setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`) + .setColor(supportbot.WarningColour); if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket}); - let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0])); + let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0])); const cantfinduser = new Discord.MessageEmbed() - .setDescription(`:x: Hmm! Does that user exist? I cannot find the user.`) - .setColor(supportbot.EmbedColour); + .setTitle("Invalid User!") + .setDescription(`:warning: This user doesn't exist, Are they in this server?\n\nTry Again:\`${supportbot.Prefix}${supportbot.Add_Command} \``) + .setColor(supportbot.WarningColour); if(!rUser) return message.channel.send({embed: cantfinduser}); - const channel = message.guild.channels.find(channel => channel.name === message.channel.name); - - const cantfindchannel = new Discord.MessageEmbed() - .setDescription(`:x: Hmm! Does that ticket exist? I cannot find the ticket channel.`) - .setColor(supportbot.EmbedColour); - - if(!channel) return message.channel.send({embed: cantfindchannel}); - // message.delete().catch(O_o=>{}); - message.channel.overwritePermissions(rUser, { READ_MESSAGES: true, SEND_MESSAGES: true }); + message.channel.updateOverwrite(rUser, { READ_MESSAGES: true, SEND_MESSAGES: true }); const useradded = new Discord.MessageEmbed() - .setColor(supportbot.EmbedColour) + .setColor(supportbot.SuccessColour) .setTitle("User Added") .setDescription(`πŸ‘ ${rUser} has been added to this ticket`) .setTimestamp(); diff --git a/commands/announce.js b/commands/announce.js index 2f0be51..91c6701 100644 --- a/commands/announce.js +++ b/commands/announce.js @@ -11,21 +11,16 @@ const yaml = require('js-yaml'); const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8')); exports.run = (bot, message, args) => { - message.delete(); console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Announcement_Command}`); - let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`) + let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole); - const rolemissing = new Discord.MessageEmbed() - .setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)}) - - const donothaverole = new Discord.MessageEmbed() - .setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole) + const rolerequired = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``) + .setColor(supportbot.ErrorColour); + if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired}); const embed = new Discord.MessageEmbed() .setTitle(`${supportbot.Announcement_Title}`) @@ -33,17 +28,23 @@ exports.run = (bot, message, args) => { .setTimestamp() .setColor(supportbot.EmbedColour) .setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL) - - let ac = message.guild.channels.find(AnnounceChannel => AnnounceChannel.name === `${supportbot.Announcement_Channel}`) - if(!ac) return message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Announcement_Channel}**`) - ac.send("@everyone").then((msg) => { - ac.send(embed); + let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Announcement_Channel}`) + + const errornochannel = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Announcement_Channel}\`\n\nError Code: \`SB-03\``) + .setColor(supportbot.ErrorColour); + if(!locateChannel) return message.channel.send(errornochannel); + + locateChannel.send(supportbot.everyone).then((msg) => { + locateChannel.send(embed); }); + const AccSuccessEmbed = new Discord.MessageEmbed() .setTitle("Announcement Created") - .setDescription(`πŸ‘ Successfully sent your announcement to <#${ac.id}>`) + .setDescription(`πŸ‘ Successfully sent your announcement to <#${locateChannel.id}>`) .setColor(supportbot.EmbedColour) message.channel.send({embed: AccSuccessEmbed}); diff --git a/commands/close.js b/commands/close.js index 09664c2..cbcf82c 100644 --- a/commands/close.js +++ b/commands/close.js @@ -20,9 +20,9 @@ exports.run = (bot, message, args) => { if ( !message.channel.name.startsWith( `${supportbot.Ticket_Channel_Name}-` ) ) { const embed = new Discord.MessageEmbed() - .setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`) - .setColor(supportbot.EmbedColour); - + .setTitle("Incorrect Channel") + .setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`) + .setColor(supportbot.WarningColour); message.channel.send(embed); return; } @@ -41,7 +41,7 @@ exports.run = (bot, message, args) => { errors: [ 'time' ], } ).then( collected => { - let logChannel = message.guild.channels.find(channel => channel.name === supportbot.Transcript_Log); + let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.Transcript_Log); let user = message.author; @@ -60,7 +60,7 @@ exports.run = (bot, message, args) => { .addField("Closed By", message.author.tag) .addField("Reason", reason); - message.channel.fetchMessages({ limit: 100 }) + message.channel.messages.fetch({ limit: 100 }) .then( msgs => { let txt = ''; @@ -84,11 +84,11 @@ exports.run = (bot, message, args) => { logChannel.send(logEmbed).catch(err => { message.reply(err) }) - logChannel.send( new Discord.Attachment( Buffer.from( txt ), `${name}.txt` ) ); + logChannel.send( new Discord.MessageAttachment( Buffer.from( txt ), `${name}.txt` ) ); message.channel.delete(); - // message.channel.fetchMessages( { limit: 100, before: msgs.last().id } ) + // message.channel.messages.fetch( { limit: 100, before: msgs.last().id } ) // .then( msg => { // const merged = msgs.concat( msg ); diff --git a/commands/forceclose.js b/commands/forceclose.js index f7d2882..c818431 100644 --- a/commands/forceclose.js +++ b/commands/forceclose.js @@ -14,24 +14,21 @@ exports.run = async (bot, message, args) => { console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Forceclose_Command}`); - let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`) + let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole); - const rolemissing = new Discord.MessageEmbed() - .setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!staffGroup) return message.reply({embed: rolemissing}); - - const donothaverole = new Discord.MessageEmbed() - .setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole}); + const rolerequired = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``) + .setColor(supportbot.ErrorColour); + if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired}); const outsideticket = new Discord.MessageEmbed() - .setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`) - .setColor(supportbot.EmbedColour) + .setTitle("Incorrect Channel") + .setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`) + .setColor(supportbot.WarningColour); if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket}); - const log = message.guild.channels.find(channel => channel.name === supportbot.Transcript_Log) + const log = message.guild.channels.cache.find(channel => channel.name === supportbot.Transcript_Log) const uID = message.author const reason = args.join(" ") || "No Reason Provided."; const name = message.channel.name; @@ -48,10 +45,10 @@ exports.run = async (bot, message, args) => { .addField("Ticket Author", uID) .addField("Closed By", message.author.tag) .addField("Reason", reason) - message.channel.fetchMessages({ limit: 100 }) + message.channel.messages.fetch({ limit: 100 }) .then(msgs => { - message.channel.fetchMessages({ limit: 100, before: msgs.last().id }) + message.channel.messages.fetch({ limit: 100, before: msgs.last().id }) .then(msg => { const merged = msgs.concat(msg); diff --git a/commands/help.js b/commands/help.js index 9a48058..51eed84 100644 --- a/commands/help.js +++ b/commands/help.js @@ -37,11 +37,12 @@ exports.run = (bot, message, args) => { const embed = new Discord.MessageEmbed() .setTitle(supportbot.Bot_Name) - .addField("πŸ‘¨ User Commands", userCommands) - .addField(":pushpin: Support Commands", supportCommands) - .addField("πŸ”‘ Staff Commands", staffCommands) + .addField("🟨 User Commands", userCommands) + .addField("🎫 Support Commands", supportCommands) + .addField("πŸ” Staff Commands", staffCommands) .setColor(supportbot.EmbedColour) .setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL); + message.channel.send(embed); } diff --git a/commands/lockchat.js b/commands/lockchat.js index b64729c..9804272 100644 --- a/commands/lockchat.js +++ b/commands/lockchat.js @@ -14,18 +14,14 @@ exports.run = async(bot, message, args) => { console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Lockchat_Command}`); - let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`) - let lockedRole = message.guild.roles.find(lc => lc.name === `${supportbot.locked_role}`) + let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`) + let lockedRole = message.guild.roles.cache.find(lc => lc.name === `${supportbot.locked_role}`) - const rolemissing = new Discord.MessageEmbed() - .setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)}) - - const donothaverole = new Discord.MessageEmbed() - .setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole) + const rolerequired = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``) + .setColor(supportbot.ErrorColour); + if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired}); message.channel.overwritePermissions(lockedRole, { READ_MESSAGES: false, SEND_MESSAGES: false }); message.channel.overwritePermissions(staffGroup, { READ_MESSAGES: true, SEND_MESSAGES: true }); diff --git a/commands/poll.js b/commands/poll.js index b5d8862..94a1858 100644 --- a/commands/poll.js +++ b/commands/poll.js @@ -14,17 +14,13 @@ exports.run = (bot, message, args) => { console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Poll_Command}`); - let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`) + let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`) - const rolemissing = new Discord.MessageEmbed() - .setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)}) - - const donothaverole = new Discord.MessageEmbed() - .setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole) + const rolerequired = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``) + .setColor(supportbot.ErrorColour); + if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired}); const embed = new Discord.MessageEmbed() .setTitle(`${supportbot.Poll_Title}`) @@ -33,10 +29,15 @@ exports.run = (bot, message, args) => { .setColor(supportbot.EmbedColour) .setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL) - let ac = message.guild.channels.find(AnnounceChannel => AnnounceChannel.name === `${supportbot.Poll_Channel}`) - if(!ac) return message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Poll_Channel}**`) + let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Poll_Channel}`) + + const errornochannel = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Poll_Channel}\`\n\nError Code: \`SB-03\``) + .setColor(supportbot.ErrorColour); + if(!locateChannel) return message.channel.send(errornochannel); - ac.send(embed) + locateChannel.send(embed) .then(async function(msg) { msg.react(supportbot.Reaction_Poll_1).then(() => msg.react(supportbot.Reaction_Poll_2)); diff --git a/commands/remove.js b/commands/remove.js index 905d74f..b03abe1 100644 --- a/commands/remove.js +++ b/commands/remove.js @@ -13,40 +13,30 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8')) exports.run = async (bot, message, args) => { console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Remove_Command}`); + + let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole); - let staffGroup = message.guild.roles.find(staffRole => staffRole.name === supportbot.StaffRole) - - const rolemissing = new Discord.MessageEmbed() - .setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!staffGroup) return message.reply({embed: rolemissing}); - - const donothaverole = new Discord.MessageEmbed() - .setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole}); + const rolerequired = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``) + .setColor(supportbot.ErrorColour); + if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired}); const outsideticket = new Discord.MessageEmbed() - .setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`) - .setColor(supportbot.EmbedColour) + .setTitle("Incorrect Channel") + .setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`) + .setColor(supportbot.WarningColour); if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket}); - let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0])); + let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0])); const cantfinduser = new Discord.MessageEmbed() - .setDescription(`:x: Hmm! Does that user exist? I cannot find the user.`) - .setColor(supportbot.EmbedColour) + .setTitle("Invalid User!") + .setDescription(`:warning: This user doesn't exist, Are they in this server?\n\nTry Again:\`${supportbot.Prefix}${supportbot.Remove_Command} \``) + .setColor(supportbot.WarningColour); if(!rUser) return message.channel.send({embed: cantfinduser}); - - const channel = message.guild.channels.find(channel => channel.name === message.channel.name); - - const cantfindchannel = new Discord.MessageEmbed() - .setDescription(`:x: Hmm! Does that ticket exist? I cannot find the ticket channel.`) - .setColor(supportbot.EmbedColour) - if(!channel) return message.channel.send({embed: cantfindchannel}); - // message.delete().catch(O_o=>{}); - - message.channel.overwritePermissions(rUser, { READ_MESSAGES: false, SEND_MESSAGES: false }); + + message.channel.updateOverwrite(rUser, { READ_MESSAGES: false, SEND_MESSAGES: false }); const useradded = new Discord.MessageEmbed() .setColor(supportbot.EmbedColour) diff --git a/commands/rename.js b/commands/rename.js index 9fc2dd0..603ac96 100644 --- a/commands/rename.js +++ b/commands/rename.js @@ -14,18 +14,14 @@ exports.run = async (bot, message, args) => { console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Rename_Command}`); - let staffGroup = message.guild.roles.find(staffRole => staffRole.name === supportbot.StaffRole) + let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole); - const rolemissing = new Discord.MessageEmbed() - .setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`) - .setColor(supportbot.colour) - if (!staffGroup) return message.reply({embed: rolemissing}); - - const donothaverole = new Discord.MessageEmbed() - .setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`) - .setColor(supportbot.colour) - if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole}); - + const rolerequired = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``) + .setColor(supportbot.ErrorColour); + if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired}); + const outsideticket = new Discord.MessageEmbed() .setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`) .setColor(supportbot.colour) @@ -40,10 +36,15 @@ exports.run = async (bot, message, args) => { .setColor(supportbot.EmbedColour) .setFooter(supportbot.EmbedFooter) - let logChannel = message.guild.channels.find(TicketChannel => TicketChannel.name === `${supportbot.Ticket_Logs}`); - if(!logChannel) return message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Ticket_Logs}**`); - - logChannel.send({embed: logEmbed}); + let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Ticket_Logs}`) + + const errornochannel = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Ticket_Logs}\`\n\nError Code: \`SB-03\``) + .setColor(supportbot.ErrorColour); + if(!locateChannel) return message.channel.send(errornochannel); + + locateChannel.send(logEmbed) }; diff --git a/commands/report.js b/commands/report.js index ac6f4c3..eb2acd2 100644 --- a/commands/report.js +++ b/commands/report.js @@ -14,21 +14,20 @@ exports.run = (bot, message, args) => { console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Report_Command}`); - let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`); - - const rolemissing = new Discord.MessageEmbed() - .setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour); + let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`); if(!staffGroup) { message.reply(rolemissing).catch(err => { console.error(err); }); } else { - const donothaverole = new Discord.MessageEmbed() - .setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if(!message.member.roles.has(staffGroup.id)) { + const rolerequired = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``) + .setColor(supportbot.ErrorColour) + + if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired}); + if(!message.member.roles.cache.has(staffGroup.id)) { message.reply(donothaverole); } else { if(!args[0]) { @@ -47,11 +46,16 @@ exports.run = (bot, message, args) => { .setTimestamp(new Date()) .setColor(supportbot.EmbedColour) .setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL); - let rc = message.guild.channels.find(ReportChannel => ReportChannel.name === `${supportbot.Report_Channel}`) - if(!rc) { - message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Report_Channel}**`); + let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Report_Channel}`) + if(!locateChannel) { + const errornochannel = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Report_Channel}\`\n\nError Code: \`SB-03\``) + .setColor(supportbot.ErrorColour); + if(!locateChannel) return message.channel.send(errornochannel); + } else { - rc.send(embed); + locateChannel.send(embed); } } diff --git a/commands/say.js b/commands/say.js index aa2624f..f0cd41a 100644 --- a/commands/say.js +++ b/commands/say.js @@ -14,17 +14,13 @@ exports.run = (bot, message, args) => { console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Say_Command}`); - let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`) + let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.StaffRole); - const rolemissing = new Discord.MessageEmbed() - .setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)}) - - const donothaverole = new Discord.MessageEmbed() - .setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole) + const rolerequired = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``) + .setColor(supportbot.ErrorColour); + if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired}); const embed = new Discord.MessageEmbed() .setTitle(`${supportbot.Announcement_Title}`) diff --git a/commands/suggest.js b/commands/suggest.js index 2f4a016..d4166a8 100644 --- a/commands/suggest.js +++ b/commands/suggest.js @@ -1,3 +1,4 @@ + // SupportBot // Created by Β© 2020 Emerald Services // Command: Say @@ -20,18 +21,23 @@ exports.run = async(bot, message, args) => { .setFooter(`${supportbot.EmbedFooter}`, message.author.avatarURL) .setTimestamp(new Date()) .setColor(supportbot.EmbedColour) - - let sc = message.guild.channels.find(SuggestionChannel => SuggestionChannel.name === `${supportbot.Suggestion_Channel}`); - if(!sc) return message.channel.send(`:x: Error! Could not find the suggestion channel **${supportbot.Suggestion_Channel}**`); - - sc.send(SuggestionEmbed) + + let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Suggestion_Channel}`) + + const errornochannel = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Suggestion_Channel}\`\n\nError Code: \`SB-03\``) + .setColor(supportbot.ErrorColour); + if(!locateChannel) return message.channel.send(errornochannel); + + locateChannel.send(SuggestionEmbed) .then(async function(msg) { msg.react(supportbot.suggestyes).then(() => msg.react(supportbot.suggestno)); }); const SuggestionSuccessEmbed = new Discord.MessageEmbed() - .setDescription(`πŸ‘ Suggestion has been successfully created\nYou can view your suggestion in <#${sc.id}>`) + .setDescription(`πŸ‘ Suggestion has been successfully created\nYou can view your suggestion in <#${locateChannel.id}>`) .setColor(supportbot.EmbedColour) message.channel.send(SuggestionSuccessEmbed); diff --git a/commands/ticket.js b/commands/ticket.js index 8cc07d0..1e8f033 100644 --- a/commands/ticket.js +++ b/commands/ticket.js @@ -1,6 +1,6 @@ // SupportBot // Created by Β© 2020 Emerald Services -// Command: Say +// Command: Ticket const Discord = require("discord.js"); const bot = new Discord.Client(); @@ -27,34 +27,34 @@ exports.run = async (bot, message, args) => { .setColor(supportbot.EmbedColour) // Ticket Creation - if (message.guild.channels.find(TicketChannel => TicketChannel.name === `${supportbot.Ticket_Channel_Name}-` + message.author.username)) return message.channel.send(alreadyopen); - message.guild.createChannel(`${supportbot.Ticket_Channel_Name}-${ticketNumberID}`, { + if (message.guild.channels.cache.find(TicketChannel => TicketChannel.name === `${supportbot.Ticket_Channel_Name}-` + message.author.username)) return message.channel.send(alreadyopen); + message.guild.channels.create(`${supportbot.Ticket_Channel_Name}-${ticketNumberID}`, { type: 'text', }).then(TicketChannel => { // Roles - let staff = message.guild.roles.find(supportRole => supportRole.name === `${supportbot.StaffRole}`) - let everyone = message.guild.roles.find(everyoneRole => everyoneRole.name === "@everyone") - let department = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_1}`) - let department2 = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_2}`) - let department3 = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_3}`) + let staff = message.guild.roles.cache.find(supportRole => supportRole.name === `${supportbot.StaffRole}`) + let everyone = message.guild.roles.cache.find(everyoneRole => everyoneRole.name === "@everyone") + let department = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_1}`) + let department2 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_2}`) + let department3 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_3}`) // Permissions - TicketChannel.overwritePermissions(everyone, { SEND_MESSAGES: false, READ_MESSAGES: false }) - TicketChannel.overwritePermissions(department, { SEND_MESSAGES: false, READ_MESSAGES: false }) - TicketChannel.overwritePermissions(department2, { SEND_MESSAGES: false, READ_MESSAGES: false }) - TicketChannel.overwritePermissions(department3, { SEND_MESSAGES: false, READ_MESSAGES: false }) - TicketChannel.overwritePermissions(staff, { SEND_MESSAGES: true, READ_MESSAGES: true }) - TicketChannel.overwritePermissions(message.author, { SEND_MESSAGES: false, READ_MESSAGES: true }) - TicketChannel.overwritePermissions(bot.user, { SEND_MESSAGES: true, READ_MESSAGES: true }) + TicketChannel.updateOverwrite(everyone, { SEND_MESSAGES: false, READ_MESSAGES: false }) + TicketChannel.updateOverwrite(department, { SEND_MESSAGES: false, READ_MESSAGES: false }) + TicketChannel.updateOverwrite(department2, { SEND_MESSAGES: false, READ_MESSAGES: false }) + TicketChannel.updateOverwrite(department3, { SEND_MESSAGES: false, READ_MESSAGES: false }) + TicketChannel.updateOverwrite(staff, { SEND_MESSAGES: true, READ_MESSAGES: true }) + TicketChannel.updateOverwrite(message.author, { SEND_MESSAGES: false, READ_MESSAGES: true }) + TicketChannel.updateOverwrite(bot.user, { SEND_MESSAGES: true, READ_MESSAGES: true }) // Category - let category = message.guild.channels.find(c => c.name === supportbot.category); + let category = message.guild.channels.cache.find(c => c.name === supportbot.category); if (category) { TicketChannel.setParent(category.id); } else { - if (message.guild.channels.get(supportbot.category)) { - TicketChannel.setParent(message.guild.channels.get(supportbot.category).id); + if (message.guild.channels.cache.get(supportbot.category)) { + TicketChannel.setParent(message.guild.channels.cache.get(supportbot.category).id); } } @@ -62,7 +62,7 @@ exports.run = async (bot, message, args) => { .setTitle(":white_check_mark: Support Ticket Created") .setDescription(`<@${message.author.id}> your support ticket created successfully`) .addField("Your Ticket:", `<#${TicketChannel.id}>`) - .setColor(supportbot.Ticket_Colour) + .setColor(supportbot.SuccessColour) message.channel.send({embed: ticketopened}); // Ticket Message - ( Able to edit this message via the settings.json file ) const ticketMessage = `Hi! <@${message.author.id}>\n${supportbot.Ticket_Message}`; @@ -99,24 +99,33 @@ exports.run = async (bot, message, args) => { const reaction = collected.first(); if (reaction.emoji.name === `${Emoji_1}`) { - TicketChannel.overwritePermissions(staff, { SEND_MESSAGES: true, READ_MESSAGES: true }) - TicketChannel.overwritePermissions(department, { SEND_MESSAGES: true, READ_MESSAGES: true }) + TicketChannel.updateOverwrite(staff, { SEND_MESSAGES: true, READ_MESSAGES: true }) + TicketChannel.updateOverwrite(department, { SEND_MESSAGES: true, READ_MESSAGES: true }) - msg.channel.send("You have contacted out " + department + "\nPlease wait patiently for someone to reach out to you.") + const dept1 = new Discord.MessageEmbed() + .setDescription(`You have requested to contact ${department}. Please wait patiently for someone to reach out to you.`) + .setColor(supportbot.SuccessColour) + TicketChannel.send(dept1) } if (reaction.emoji.name === `${Emoji_2}`) { - TicketChannel.overwritePermissions(staff, { SEND_MESSAGES: true, READ_MESSAGES: true }) - TicketChannel.overwritePermissions(department2, { SEND_MESSAGES: true, READ_MESSAGES: true }) + TicketChannel.updateOverwrite(staff, { SEND_MESSAGES: true, READ_MESSAGES: true }) + TicketChannel.updateOverwrite(department2, { SEND_MESSAGES: true, READ_MESSAGES: true }) - msg.channel.send("You have contacted out " + department2 + "\nPlease wait patiently for someone to reach out to you.") + const dept2 = new Discord.MessageEmbed() + .setDescription(`You have requested to contact ${department2}. Please wait patiently for someone to reach out to you.`) + .setColor(supportbot.SuccessColour) + TicketChannel.send(dept2) } if (reaction.emoji.name === `${Emoji_3}`) { - TicketChannel.overwritePermissions(staff, { SEND_MESSAGES: true, READ_MESSAGES: true }) - TicketChannel.overwritePermissions(department3, { SEND_MESSAGES: true, READ_MESSAGES: true }) + TicketChannel.updateOverwrite(staff, { SEND_MESSAGES: true, READ_MESSAGES: true }) + TicketChannel.updateOverwrite(department3, { SEND_MESSAGES: true, READ_MESSAGES: true }) - msg.channel.send("You have contacted out " + department3 + "\nPlease wait patiently for someone to reach out to you.") + const dept3 = new Discord.MessageEmbed() + .setDescription(`You have requested to contact ${department3}. Please wait patiently for someone to reach out to you.`) + .setColor(supportbot.SuccessColour) + TicketChannel.send(dept3) } }); @@ -125,7 +134,7 @@ exports.run = async (bot, message, args) => { // Ticket Logging const logEmbed = new Discord.MessageEmbed() - .setTitle(":ticket: Logistics of your Ticket") + .setTitle(":ticket: Ticket Log") .addField("Ticket ID", ticketNumberID, true) .addField("User", `<@${message.author.id}>`, true) .addField("Channel", `ticket#${ticketNumberID}`, true) @@ -136,10 +145,15 @@ exports.run = async (bot, message, args) => { logEmbed.addField('Subject', subject, true); } - let logChannel = message.guild.channels.find(TicketChannel => TicketChannel.name === `${supportbot.Ticket_Logs}`); - if(!logChannel) return message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Ticket_Logs}**`); - - logChannel.send({embed: logEmbed}) + let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === `${supportbot.Ticket_Logs}`) + + const errornochannel = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.Ticket_Logs}\`\n\nError Code: \`SB-03\``) + .setColor(supportbot.ErrorColour); + if(!locateChannel) return message.channel.send(errornochannel); + + locateChannel.send(logEmbed) }).catch(err=>{console.error(err)}); diff --git a/commands/unlock.js b/commands/unlock.js index 99a8238..0193f88 100644 --- a/commands/unlock.js +++ b/commands/unlock.js @@ -14,18 +14,14 @@ exports.run = async(bot, message, args) => { console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.UnLockchat_Command}`); - let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`) - let lockedRole = message.guild.roles.find(lc => lc.name === `${supportbot.locked_role}`) + let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`) + let lockedRole = message.guild.roles.cache.find(lc => lc.name === `${supportbot.locked_role}`) - const rolemissing = new Discord.MessageEmbed() - .setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)}) - - const donothaverole = new Discord.MessageEmbed() - .setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`) - .setColor(supportbot.EmbedColour) - if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole) + const rolerequired = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-02\``) + .setColor(supportbot.ErrorColour); + if (!message.member.roles.cache.has(staffGroup.id)) return message.reply({embed: rolerequired}); message.channel.overwritePermissions(lockedRole, { READ_MESSAGES: true, SEND_MESSAGES: true }); message.channel.overwritePermissions(staffGroup, { READ_MESSAGES: true, SEND_MESSAGES: true }); diff --git a/index.js b/index.js index 6bf6d55..8e5ea6f 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ // |_| |_| // Β© 2020 Created by Emerald Services // Licnese: MIT -// SupportBot v5.1.2 +// SupportBot v5.2 const Discord = require("discord.js"); const fs = require("fs"); @@ -37,7 +37,7 @@ fs.readdir("./sb-addons/", (err, files) => { if(err) console.log(err); let jsfile = files.filter(f => f.split(".").pop() === "js") - if(jsfile.length <= 0) return console.log(`${supportbot.Bot_Name} No addons detected nor default! Either download addons from https://itzemerald.tk/`); + if(jsfile.length <= 0) return console.log(`${supportbot.Bot_Name} No addons detected nor default! Either download addons from https://emeraldservices.xyz/`); jsfile.forEach((f, i) =>{ let props = require(`./sb-addons/${f}`); @@ -50,9 +50,10 @@ fs.readdir("./sb-addons/", (err, files) => { bot.on("ready", async () => { bot.user.setActivity(supportbot.BotActivity, {type: supportbot.ActvityType}); console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`) - console.log(`\u001b[37m`, `Emerald Services has successfully connected to discord`) + console.log(`\u001b[37m`, `${supportbot.Bot_Name} has successfully connected to discord`) + console.log(`\u001b[37m`, `You can download additional features from our marketplace https://emeraldservices.xyz/`) console.log(`\u001b[37m`, `Invite your bot with https://discordapp.com/api/oauth2/authorize?client_id=${bot.user.id}&permissions=8&scope=bot`) - console.log(`\u001b[37m`, `Β© ️SupportBot created by Emerald Services`) + console.log(`\u001b[37m`, `Β© SupportBot created by Emerald Services`) console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`) }); @@ -66,6 +67,42 @@ bot.on("message", async message => { const args = message.content.slice(supportbot.Prefix.length).trim().split(/ +/g); const command = args.shift().toLowerCase(); + let staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === `${supportbot.StaffRole}`) + let autoGroup = message.guild.roles.cache.find(autoRole => autoRole.name === `${supportbot.AutoRole}`) + let deptGroup1 = message.guild.roles.cache.find(deptRole1 => deptRole1.name === `${supportbot.Department_Role_1}`) + let deptGroup2 = message.guild.roles.cache.find(deptRole2 => deptRole2.name === `${supportbot.Department_Role_2}`) + let deptGroup3 = message.guild.roles.cache.find(deptRole3 => deptRole3.name === `${supportbot.Department_Role_3}`) + + const rolemissing = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Staff role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.StaffRole}\`\n\nError Code: \`SB-01\``) + .setColor(supportbot.ErrorColour) + if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)}) + + const rolemissing1 = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Auto Role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.AutoRole}\`\n\nError Code: \`SB-01\``) + .setColor(supportbot.ErrorColour) + if (!autoGroup) return message.reply(rolemissing1).catch(err=>{console.error(err)}) + + const rolemissing2 = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Department Role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.Department_Role_1}\`\n\nError Code: \`SB-01\``) + .setColor(supportbot.ErrorColour) + if (!deptGroup1) return message.reply(rolemissing2).catch(err=>{console.error(err)}) + + const rolemissing3 = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Department Role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.Department_Role_2}\`\n\nError Code: \`SB-01\``) + .setColor(supportbot.ErrorColour) + if (!deptGroup2) return message.reply(rolemissing3).catch(err=>{console.error(err)}) + + const rolemissing4 = new Discord.MessageEmbed() + .setTitle("SupportBot Error!") + .setDescription(`:x: **Error!** Department Role missing, You cannot execute any commands as the following role does not exist with this server.\nThis role is configurable via **supportbot-config.yml**\n\nPlease create the role: \`${supportbot.Department_Role_3}\`\n\nError Code: \`SB-01\` `) + .setColor(supportbot.ErrorColour) + if (!deptGroup3) return message.reply(rolemissing4).catch(err=>{console.error(err)}) + const cmd = bot.commands.get(command); if(!cmd) return; cmd.run(bot, message, args); diff --git a/package.json b/package.json index 1f1d055..b92fa1d 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "author": "Emerald SRV", "license": "MIT", "dependencies": { - "discord.js": "^11.5.1", + "discord.js": "^12.1.1", "js-yaml": "^3.13.1" } } diff --git a/sb-addons/default-addon.js b/sb-addons/default-addon.js index 50c3f10..91828fc 100644 --- a/sb-addons/default-addon.js +++ b/sb-addons/default-addon.js @@ -10,7 +10,7 @@ someaddon.settings = require("./settings/someaddon.json"); exports.run = async(bot, message, args) => { message.delete(); - message.channel.send(":white_check_mark: **SupportBot Addon**\nThis addon is here by default.\nWe are currently working on some super amazing addons for SupportBot\nHowever, If you would like to start creating your own support bot addon\ncontact us at EmeraldServices.\n") + message.channel.send(":white_check_mark: **SupportBot Addon**\nYou can download addons from our marketplace. https://emeraldservices.xyz/") } diff --git a/storage/tickets.json b/storage/tickets.json index 0967ef4..9e26dfe 100644 --- a/storage/tickets.json +++ b/storage/tickets.json @@ -1 +1 @@ -{} +{} \ No newline at end of file diff --git a/supportbot-config.yml b/supportbot-config.yml index 6160f93..c87eaaa 100644 --- a/supportbot-config.yml +++ b/supportbot-config.yml @@ -5,21 +5,26 @@ # /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__| # \/ |__| |__| \/ # -# SupportBot v5.1.2 +# SupportBot v5.2 # Created by Β© 2020 Emerald Services # License: MIT #Bot Indentification -Token: "Bot_Token_Here" +Token: "BOT_TOKEN_HERE" Prefix: "!" Bot_Name: "SupportBot" -BotActivity: "SupportBot v5.1" +BotActivity: "SupportBot v5.2" ActivityType: "PLAYING" EmbedColour: "#4bbf5c" EmbedFooter: "SupportBot | The #1 Supportive Discord Bot" +# Colour Settings +ErrorColour: "#ff3030" +SuccessColour: "#4bbf5c" +WarningColour: "#fca117" + # Role Settings AutoRole: "Member" StaffRole: "Support" @@ -28,19 +33,21 @@ locked_role: "@everyone" everyone: "@everyone" Department_Role_1: "Support" -Department_Role_2: "Security" -Department_Role_3: "Sales" +Department_Role_2: "Sales" +Department_Role_3: "Support" -# Welcome & Leave -WelcomeChannel: "welcome" -WelcomeMessage: "Welcome to the server!" +# Ticket Department Settings +Ticket_Department_1: "Support" +Ticket_Department_2: "Sales" +Ticket_Department_3: "Other" -LeaveChannel: "welcome" -LeaveMessage: "Thank you for visiting us!" +Ticket_Department_Emoji_1: "🟒" +Ticket_Department_Emoji_2: "πŸ”΅" +Ticket_Department_Emoji_3: "πŸ”΄" # Ticket Settings category: "Tickets" -Ticket_Colour: "#000e42" +Ticket_Colour: "#4bbf5c" Ticket_Channel_Name: "ticket" Ticket_Logs: "ticket-logs" @@ -54,14 +61,12 @@ Closure_Confirm_Word: "confirm" Ticket_Message: "Your support ticket has been opened successfully\nPlease allow us some time to reach out to you." Default_Ticket_Reason: "No Subject" -# Ticket Department Settings -Ticket_Department_1: "Support" -Ticket_Department_2: "Security" -Ticket_Department_3: "Sales" +# Welcome & Leave +WelcomeChannel: "welcome" +WelcomeMessage: "Welcome to the server!" -Ticket_Department_Emoji_1: "🎧" -Ticket_Department_Emoji_2: "πŸ”" -Ticket_Department_Emoji_3: "πŸ’΅" +LeaveChannel: "welcome" +LeaveMessage: "Thank you for visiting us!" # Announcement Settings Announcement_Title: "SupportBot Announcement" @@ -69,11 +74,11 @@ Announcement_Channel: "announcements" Announcement_Tag_Role: "@everyone" # Poll Settings -Poll_Channel": "polls" -Poll_Title": "πŸ“Š Polls" +Poll_Channel: "polls" +Poll_Title: "πŸ“Š Polls" -Reaction_Poll_1": "βœ…" -Reaction_Poll_2": "❎" +Reaction_Poll_1: "βœ…" +Reaction_Poll_2: "❎" # Suggestion Settings Suggestion_Title: "SupportBot Suggestions"