Updated 5.2
This commit is contained in:
1 parent
8173c31a60
commit
f2de39de33
19 files changed
+269
-234
No files matched your search
+12
-6
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user