Merge pull request #40 from real2two/patch-1
Add "Delete Messages" options on the configuration file.
This commit is contained in:
13 files changed
+33
-15
No files matched your search
@@ -14,6 +14,7 @@ module.exports = {
|
||||
description: example.ExampleAddonDesc,
|
||||
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
message.channel.send(example.ExampleAddonMessage)
|
||||
}
|
||||
};
|
||||
};
|
||||
+3
-2
@@ -11,7 +11,8 @@ module.exports = {
|
||||
name: supportbot.AddUser,
|
||||
description: supportbot.AddUserDesc,
|
||||
|
||||
execute(message, args) {
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.AddUser}!`);
|
||||
|
||||
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff)
|
||||
@@ -61,4 +62,4 @@ module.exports = {
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -13,7 +13,9 @@ module.exports = {
|
||||
description: supportbot.AnnounceDesc,
|
||||
|
||||
execute(message, args) {
|
||||
|
||||
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.name === supportbot.AnnouncementChannel);
|
||||
|
||||
const errornochannel = new Discord.MessageEmbed()
|
||||
@@ -65,4 +67,4 @@ module.exports = {
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
+3
-2
@@ -13,7 +13,8 @@ module.exports = {
|
||||
description: supportbot.BotSayDesc,
|
||||
|
||||
execute(message, args) {
|
||||
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff);
|
||||
|
||||
const NoPerms = new Discord.MessageEmbed()
|
||||
@@ -47,4 +48,4 @@ module.exports = {
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
+3
-1
@@ -13,6 +13,8 @@ module.exports = {
|
||||
description: supportbot.CloseTicketDesc,
|
||||
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.CloseTicket}!`);
|
||||
|
||||
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
||||
@@ -144,4 +146,4 @@ module.exports = {
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -12,6 +12,8 @@ module.exports = {
|
||||
description: supportbot.HelpDesc,
|
||||
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
let generalCommands = "";
|
||||
generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** ${supportbot.HelpDesc}\n`;
|
||||
generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** ${supportbot.LinkDesc}\n`;
|
||||
|
||||
+2
-1
@@ -13,6 +13,7 @@ module.exports = {
|
||||
description: supportbot.LinksDesc,
|
||||
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
const LinksEmbed = new Discord.MessageEmbed()
|
||||
.setColor(supportbot.EmbedColour)
|
||||
@@ -30,4 +31,4 @@ module.exports = {
|
||||
message.channel.send({ embed: LinksEmbed });
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -14,6 +14,8 @@ module.exports = {
|
||||
description: supportbot.NewTicketDesc,
|
||||
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.NewTicket}!`);
|
||||
|
||||
// Ticket ID
|
||||
|
||||
+3
-1
@@ -12,6 +12,8 @@ module.exports = {
|
||||
description: supportbot.PingDesc,
|
||||
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
let ping = Date.now() - message.createdTimestamp + " ms";
|
||||
|
||||
const PingCommandEmbed = new Discord.MessageEmbed()
|
||||
@@ -20,4 +22,4 @@ module.exports = {
|
||||
|
||||
message.channel.send({ embed: PingCommandEmbed });
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -12,6 +12,8 @@ module.exports = {
|
||||
description: supportbot.RemoveUserDesc,
|
||||
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.RemoveUser}!`);
|
||||
|
||||
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff)
|
||||
@@ -59,4 +61,4 @@ module.exports = {
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
+3
-1
@@ -12,6 +12,8 @@ module.exports = {
|
||||
description: supportbot.SuggestionDesc,
|
||||
|
||||
execute(message, args) {
|
||||
if (supportbot.DeleteMessages == "true") message.delete();
|
||||
|
||||
let locateChannel = message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.name === supportbot.SuggestionChannel);
|
||||
|
||||
const errornochannel = new Discord.MessageEmbed()
|
||||
@@ -55,4 +57,4 @@ module.exports = {
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
+1
-3
@@ -19,6 +19,4 @@ module.exports = async (bot, message) => {
|
||||
const cmd = bot.commands.get(command);
|
||||
if(!cmd) return;
|
||||
cmd.execute(message, args);
|
||||
message.delete();
|
||||
|
||||
};
|
||||
};
|
||||
@@ -19,6 +19,8 @@ BotActivity: "-help ~ SupportBot 6.0"
|
||||
ActivityType: "PLAYING"
|
||||
# Activity status can either be PLAYING, WATCHING or LISTENING.
|
||||
|
||||
DeleteMessages: "true"
|
||||
|
||||
# Embed Configuration
|
||||
|
||||
EmbedColour: "#04b545"
|
||||
|
||||
Reference in new issue
Block a user