This commit is contained in:
ItzEmerald committed 2020-07-11 13:17:57 +01:00
1 parent 94db6cff7b
commit dcc00d8d1f
4 files changed
+89 -23

No files matched your search

+7 -7
View File
@@ -16,19 +16,19 @@ module.exports = {
let locateChannel = message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.name === supportbot.AnnouncementChannel);
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.AnnouncementChannel}\`\n\nError Code: \`SB-03\``)
.setTitle("Invalid Channel")
.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.AnnouncementChannel}`)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embed: errornochannel });
let serverAdmins = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin);
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.Admin}\`\n\nError Code: \`SB-02\``)
.setColor(supportbot.ErrorColour);
if (!message.member.roles.cache.has(serverAdmins.id)) return message.reply({embed: rolerequired});
const NoPerms = new Discord.MessageEmbed()
.setTitle("Invalid Permissions!")
.setDescription(`:warning: **Err!** You do not have the correct permissions to use this command.\n\nRole Required: \`${supportbot.serverAdmins}\``)
.setColor(supportbot.WarningColour)
message.channel.send({ embed: NoPerms });
const embed = new Discord.MessageEmbed()