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