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

+3 -2
View File
@@ -9,13 +9,14 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
module.exports = {
name: supportbot.SuggestCommand,
description: supportbot.SuggestionDesc,
execute(message, args) {
let locateChannel = message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.name === supportbot.SuggestionChannel);
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.SuggestionChannel}\`\n\nError Code: \`SB-03\``)
.setTitle("Invalid Channel")
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.SuggestionChannel}\``)
.setColor(supportbot.ErrorColour);
if(!locateChannel) return message.channel.send({ embed: errornochannel });