Updated SupportBot
Pre-Release - 5.1.0
This commit is contained in:
1 parent
3f6f9045bd
commit
2b1b6e916e
22 files changed
+580
-549
No files matched your search
+5
-4
@@ -4,14 +4,15 @@
|
|||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client()
|
||||||
|
|
||||||
|
const fs = require("fs")
|
||||||
const yaml = require('js-yaml');
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
module.exports.run = (bot, message, args) => {
|
exports.run = (bot, message, args) => {
|
||||||
message.delete();
|
|
||||||
|
|
||||||
console.log(`\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Add_Command}`);
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Add_Command}`);
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === supportbot.StaffRole);
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === supportbot.StaffRole);
|
||||||
|
|
||||||
@@ -44,7 +45,7 @@ module.exports.run = (bot, message, args) => {
|
|||||||
.setColor(supportbot.EmbedColour);
|
.setColor(supportbot.EmbedColour);
|
||||||
|
|
||||||
if(!channel) return message.channel.send({embed: cantfindchannel});
|
if(!channel) return message.channel.send({embed: cantfindchannel});
|
||||||
message.delete().catch(O_o=>{});
|
// message.delete().catch(O_o=>{});
|
||||||
message.channel.overwritePermissions(rUser, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
message.channel.overwritePermissions(rUser, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
||||||
|
|
||||||
const useradded = new Discord.RichEmbed()
|
const useradded = new Discord.RichEmbed()
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client();
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
|
const fs = require("fs")
|
||||||
const yaml = require('js-yaml');
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
@@ -11,7 +13,7 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
|
|||||||
exports.run = (bot, message, args) => {
|
exports.run = (bot, message, args) => {
|
||||||
message.delete();
|
message.delete();
|
||||||
|
|
||||||
console.log(`\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Announcement_Command}`);
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Announcement_Command}`);
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
||||||
|
|
||||||
@@ -43,7 +45,7 @@ exports.run = (bot, message, args) => {
|
|||||||
.setTitle("Announcement Created")
|
.setTitle("Announcement Created")
|
||||||
.setDescription(`👍 Successfully sent your announcement to <#${ac.id}>`)
|
.setDescription(`👍 Successfully sent your announcement to <#${ac.id}>`)
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
message.channel.send({embed: AccSucessEmbed});
|
message.channel.send({embed: AccSuccessEmbed});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+36
-48
@@ -1,60 +1,65 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
// Command: Close Ticket
|
// Created by © 2020 Emerald Services
|
||||||
|
// Command: Close
|
||||||
|
|
||||||
const Discord = require( "discord.js" );
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.settings = require( "../settings.json" );
|
const fs = require("fs");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Discord.Message} message
|
* @param {Discord.Message} message
|
||||||
*/
|
*/
|
||||||
exports.run = ( bot, message, args ) => {
|
|
||||||
message.delete();
|
|
||||||
|
|
||||||
|
exports.run = (bot, message, args) => {
|
||||||
|
|
||||||
if ( !message.channel.name.startsWith( `${bot.settings.Ticket_Channel_Name}-` ) ) {
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Close_Command}`);
|
||||||
|
|
||||||
|
if ( !message.channel.name.startsWith( `${supportbot.Ticket_Channel_Name}-` ) ) {
|
||||||
const embed = new Discord.RichEmbed()
|
const embed = new Discord.RichEmbed()
|
||||||
.setDescription( `:x: Cannot use this command becase you are outside a ticket channel.` )
|
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
||||||
.setColor( bot.settings.colour );
|
.setColor(supportbot.EmbedColour);
|
||||||
|
|
||||||
message.channel.send( embed );
|
message.channel.send(embed);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeRequestEmbed = new Discord.RichEmbed()
|
const closeRequestEmbed = new Discord.RichEmbed()
|
||||||
.setDescription( `Looks like you have come to the end of your support ticket\nPlease confirm that you want to close your ticket by saying ||**confirm**||` )
|
.setDescription(`Looks like you have come to the end of your support ticket\nPlease confirm that you want to close your ticket by saying ||**confirm**||`)
|
||||||
.setFooter( "Your request will be avoided in 20 seconds" )
|
.setFooter("Your request will be avoided in 20 seconds")
|
||||||
.setColor( bot.settings.colour )
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
|
||||||
message.channel.send( closeRequestEmbed ).then( m => {
|
message.channel.send(closeRequestEmbed).then( m => {
|
||||||
message.channel.awaitMessages( response => response.content.toLowerCase() === `confirm`, {
|
message.channel.awaitMessages( response => response.content.toLowerCase() === `confirm`, {
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 20 * 1000,
|
time: 20 * 1000,
|
||||||
errors: [ 'time' ],
|
errors: [ 'time' ],
|
||||||
|
|
||||||
} ).then( collected => {
|
} ).then( collected => {
|
||||||
let logChannel = message.guild.channels.find( channel => channel.name === bot.settings.Transcript_Logs );
|
let logChannel = message.guild.channels.find( channel => channel.name === supportbot.Transcript_Logs );
|
||||||
|
|
||||||
let user = message.author;
|
let user = message.author;
|
||||||
|
|
||||||
let reason = args.join( " " ) || "No reason provided.";
|
let reason = args.join(" ") || "No reason provided.";
|
||||||
|
|
||||||
let name = message.channel.name;
|
let name = message.channel.name;
|
||||||
let ticketChannel = message.channel;
|
let ticketChannel = message.channel;
|
||||||
|
|
||||||
message.channel.send( bot.settings.Ticket_Closing )
|
message.channel.send(supportbot.Ticket_Closing)
|
||||||
.then( () => {
|
.then( () => {
|
||||||
const logEmbed = new Discord.RichEmbed()
|
const logEmbed = new Discord.RichEmbed()
|
||||||
.setTitle( bot.settings.Transcript_Title )
|
.setTitle(supportbot.Transcript_Title)
|
||||||
.setColor( bot.settings.colour )
|
.setColor(supportbot.EmbedColour)
|
||||||
.setFooter( bot.settings.footer )
|
.setFooter(supportbot.EmbedFooter)
|
||||||
.addField( "Ticket Author", user )
|
.addField("Ticket Author", user)
|
||||||
.addField( "Closed By", message.author.tag )
|
.addField("Closed By", message.author.tag)
|
||||||
.addField( "Reason", reason );
|
.addField("Reason", reason);
|
||||||
|
|
||||||
message.channel.fetchMessages( { limit: 100 } )
|
message.channel.fetchMessages({ limit: 100 })
|
||||||
.then( msgs => {
|
.then( msgs => {
|
||||||
let txt = '';
|
let txt = '';
|
||||||
|
|
||||||
@@ -92,34 +97,17 @@ exports.run = ( bot, message, args ) => {
|
|||||||
// log.send( { files: [ { attachment: Buffer.from( output, 'utf8' ), name: `${name}.txt` } ] } ).then( c.delete() ).catch( console.error ); // sends the file to logs
|
// log.send( { files: [ { attachment: Buffer.from( output, 'utf8' ), name: `${name}.txt` } ] } ).then( c.delete() ).catch( console.error ); // sends the file to logs
|
||||||
// return log.send( embed1 ).catch( console.error );
|
// return log.send( embed1 ).catch( console.error );
|
||||||
// } )
|
// } )
|
||||||
} );
|
});
|
||||||
} )
|
})
|
||||||
|
|
||||||
} ).catch( () => {
|
|
||||||
m.edit( 'The request to close the ticket has timed out.' ).then( m2 => m2.delete( 3000 ) );
|
|
||||||
} );
|
|
||||||
} );
|
|
||||||
|
|
||||||
console.log( `\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Close_Command}` )
|
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle( bot.settings.Commands_Log_Title )
|
|
||||||
.addField( `User`, `<@${message.author.id}>` )
|
|
||||||
.addField( `Command`, bot.settings.Close_Command, true )
|
|
||||||
.addField( `Channel`, message.channel, true )
|
|
||||||
.addField( `Executed At`, message.createdAt, true )
|
|
||||||
.setColor( bot.settings.colour )
|
|
||||||
.setFooter( bot.settings.footer )
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find( LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}` );
|
|
||||||
if ( !CommandLog ) return message.channel.send( `:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json``` );
|
|
||||||
|
|
||||||
CommandLog.send( CMDLog );
|
|
||||||
|
|
||||||
|
}).catch( () => {
|
||||||
|
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Close_Command,
|
name: supportbot.Close_Command,
|
||||||
}
|
}
|
||||||
+36
-46
@@ -1,43 +1,50 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
// Command: Forceclose Ticket
|
// Created by © 2020 Emerald Services
|
||||||
|
// Command: Forceclose
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client()
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const fs = require("fs")
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
exports.run = async (bot, message, args) => {
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Forceclose_Command}`);
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!staffGroup) return message.reply({embed: rolemissing});
|
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole});
|
|
||||||
|
|
||||||
const outsideticket = new Discord.RichEmbed()
|
const rolemissing = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!message.channel.name.startsWith(`${bot.settings.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
|
if (!staffGroup) return message.reply({embed: rolemissing});
|
||||||
const log = message.guild.channels.find(channel => channel.name === bot.settings.Transcript_Logs)
|
|
||||||
const uID = message.author
|
|
||||||
const reason = args.join(" ") || "No Reason Provided.";
|
|
||||||
const name = message.channel.name;
|
|
||||||
const c = message.channel;
|
|
||||||
message.channel.send(`Your ticket is currently closing`)
|
|
||||||
|
|
||||||
.then(() => {
|
const donothaverole = new Discord.RichEmbed()
|
||||||
|
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole});
|
||||||
|
|
||||||
|
const outsideticket = new Discord.RichEmbed()
|
||||||
|
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
|
||||||
|
|
||||||
|
const log = message.guild.channels.find(channel => channel.name === supportbot.Transcript_Logs)
|
||||||
|
const uID = message.author
|
||||||
|
const reason = args.join(" ") || "No Reason Provided.";
|
||||||
|
const name = message.channel.name;
|
||||||
|
const c = message.channel;
|
||||||
|
|
||||||
|
message.channel.send(`Your ticket is currently closing`)
|
||||||
|
|
||||||
|
.then(() => {
|
||||||
|
|
||||||
const embed1 = new Discord.RichEmbed()
|
const embed1 = new Discord.RichEmbed()
|
||||||
.setTitle(bot.settings.Transcript_Title)
|
.setTitle(supportbot.Transcript_Title)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
.setFooter(bot.settings.footer)
|
.setFooter(supportbot.EmbedFooter)
|
||||||
.addField("Ticket Author", uID)
|
.addField("Ticket Author", uID)
|
||||||
.addField("Closed By", message.author.tag)
|
.addField("Closed By", message.author.tag)
|
||||||
.addField("Reason", reason)
|
.addField("Reason", reason)
|
||||||
@@ -57,27 +64,10 @@ if (!message.channel.name.startsWith(`${bot.settings.Ticket_Channel_Name}-`)) re
|
|||||||
return log.send(embed1).catch(console.error);
|
return log.send(embed1).catch(console.error);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Forceclose_Command}`)
|
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.Forceclose_Command, true)
|
|
||||||
.addField(`Channel`, message.channel, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Forceclose_Command,
|
name: supportbot.Forceclose_Command,
|
||||||
}
|
}
|
||||||
+29
-41
@@ -1,63 +1,51 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
|
// Created by © 2020 Emerald Services
|
||||||
// Command: Help
|
// Command: Help
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client()
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const fs = require("fs")
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
exports.run = (bot, message, args) => {
|
||||||
message.delete();
|
|
||||||
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Help_Command}`);
|
||||||
|
|
||||||
let userCommands = "";
|
let userCommands = "";
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Link_Command}**: Get some important links!\n`;
|
userCommands += `**${supportbot.Prefix}${supportbot.Link_Command}**: Get some important links!\n`;
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Ping_Command}**: Check the bots ping. Pong!\n`;
|
userCommands += `**${supportbot.Prefix}${supportbot.Ping_Command}**: Check the bots ping. Pong!\n`;
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Ticket_Command} <reason>**: Create a support ticket\n`;
|
userCommands += `**${supportbot.Prefix}${supportbot.Ticket_Command} <reason>**: Create a support ticket\n`;
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Close_Command}**: Close your support ticket\n`;
|
userCommands += `**${supportbot.Prefix}${supportbot.Close_Command}**: Close your support ticket\n`;
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Suggest_Command} <suggestion>**: Create a server suggestion\n`;
|
userCommands += `**${supportbot.Prefix}${supportbot.Suggest_Command} <suggestion>**: Create a server suggestion\n`;
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Report_Command} <user> <reason>**: Report a valid user\n`;
|
userCommands += `**${supportbot.Prefix}${supportbot.Report_Command} <user> <reason>**: Report a valid user\n`;
|
||||||
|
|
||||||
let supportCommands = "";
|
let supportCommands = "";
|
||||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Add_Command} <user>**: Adds a user to a ticket\n`;
|
supportCommands += `**${supportbot.Prefix}${supportbot.Add_Command} <user>**: Adds a user to a ticket\n`;
|
||||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Remove_Command} <user>**: Removes a user from a ticket\n`;
|
supportCommands += `**${supportbot.Prefix}${supportbot.Remove_Command} <user>**: Removes a user from a ticket\n`;
|
||||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Forceclose_Command}**: Forceclose a support ticket\n`;
|
supportCommands += `**${supportbot.Prefix}${supportbot.Forceclose_Command}**: Forceclose a support ticket\n`;
|
||||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Rename_Command}**: Rename a support ticket\n`;
|
supportCommands += `**${supportbot.Prefix}${supportbot.Rename_Command}**: Rename a support ticket\n`;
|
||||||
|
|
||||||
let staffCommands = "";
|
let staffCommands = "";
|
||||||
staffCommands += `**${bot.settings.prefix}${bot.settings.Announcement_Command} <message>**: Create a bot announcement\n`;
|
staffCommands += `**${supportbot.Prefix}${supportbot.Announcement_Command} <message>**: Create a bot announcement\n`;
|
||||||
staffCommands += `**${bot.settings.prefix}${bot.settings.Say_Command} <message>**: Send a message as the bot\n`;
|
staffCommands += `**${supportbot.Prefix}${supportbot.Say_Command} <message>**: Send a message as the bot\n`;
|
||||||
staffCommands += `**${bot.settings.prefix}${bot.settings.Lockchat_Command}**: Lock the chat channel\n`;
|
staffCommands += `**${supportbot.Prefix}${supportbot.Lockchat_Command}**: Lock the chat channel\n`;
|
||||||
staffCommands += `**${bot.settings.prefix}${bot.settings.UnLockchat_Command}**: UnLock the chat channel\n`;
|
staffCommands += `**${supportbot.Prefix}${supportbot.UnLockchat_Command}**: UnLock the chat channel\n`;
|
||||||
staffCommands += `**${bot.settings.prefix}${bot.settings.Poll_Command}**: Create a poll\n`;
|
staffCommands += `**${supportbot.Prefix}${supportbot.Poll_Command}**: Create a poll\n`;
|
||||||
|
|
||||||
const embed = new Discord.RichEmbed()
|
const embed = new Discord.RichEmbed()
|
||||||
.setTitle(bot.settings.botname)
|
.setTitle(supportbot.Bot_Name)
|
||||||
.addField(":ticket: Support Commands", userCommands)
|
.addField(":ticket: Support Commands", userCommands)
|
||||||
.addField(":pushpin: Support Commands", supportCommands, true)
|
.addField(":pushpin: Support Commands", supportCommands, true)
|
||||||
.addField(":pushpin: Staff Commands", staffCommands, true)
|
.addField(":pushpin: Staff Commands", staffCommands, true)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
.setFooter(bot.settings.footer, message.author.displayAvatarURL);
|
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL);
|
||||||
|
message.channel.send(embed);
|
||||||
message.channel.send(embed)
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Help_Command}`)
|
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.Help_Command, true)
|
|
||||||
.addField(`Channel`, message.channel, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via settings.json`);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Help_Command,
|
name: supportbot.Help_Command,
|
||||||
}
|
};
|
||||||
+20
-32
@@ -1,48 +1,36 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
// Command: Help
|
// Created by © 2020 Emerald Services
|
||||||
|
// Command: Links
|
||||||
|
|
||||||
const Discord = require( "discord.js" );
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.settings = require( "../settings.json" );
|
const fs = require("fs");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = ( bot, message, args ) => {
|
exports.run = ( bot, message, args ) => {
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let botLinks = bot.settings.LINKS;
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Link_Command}`);
|
||||||
|
|
||||||
|
let botLinks = supportbot.LINKS;
|
||||||
|
|
||||||
let links = '';
|
let links = '';
|
||||||
|
|
||||||
for ( let name in botLinks ) {
|
for ( let name in botLinks ) {
|
||||||
links += `[${name}](${botLinks[ name ]})\n`;
|
links += `[${name}](${botLinks[ name ]})\n`;
|
||||||
}
|
};
|
||||||
|
|
||||||
let embed = new Discord.RichEmbed()
|
let embed = new Discord.RichEmbed()
|
||||||
.setTitle( bot.settings.LINKS_TITLE )
|
.setTitle(supportbot.LINKS_TITLE)
|
||||||
.setDescription( links )
|
.setDescription(links)
|
||||||
.setColor( bot.settings.colour )
|
.setColor(supportbot.EmbedColour)
|
||||||
.setFooter( bot.settings.footer )
|
.setFooter(supportbot.EmbedFooter);
|
||||||
|
message.channel.send(embed);
|
||||||
|
|
||||||
message.channel.send( embed );
|
};
|
||||||
|
|
||||||
console.log( `\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Link_Command}` )
|
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.Link_Command, true)
|
|
||||||
.addField(`Channel`, message.channel, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Link_Command,
|
name: supportbot.Link_Command,
|
||||||
}
|
};
|
||||||
+20
-31
@@ -1,25 +1,30 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
// Command: Lockchat
|
// Created by © 2020 Emerald Services
|
||||||
|
// Command: Close
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const fs = require("fs");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = async(bot, message, args) => {
|
exports.run = async(bot, message, args) => {
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Lockchat_Command}`);
|
||||||
let lockedRole = message.guild.roles.find(lc => lc.name === `${bot.settings.locked_role}`)
|
|
||||||
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
||||||
|
let lockedRole = message.guild.roles.find(lc => lc.name === `${supportbot.locked_role}`)
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
const rolemissing = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
const donothaverole = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
||||||
|
|
||||||
message.channel.overwritePermissions(lockedRole, { READ_MESSAGES: false, SEND_MESSAGES: false });
|
message.channel.overwritePermissions(lockedRole, { READ_MESSAGES: false, SEND_MESSAGES: false });
|
||||||
@@ -27,27 +32,11 @@ exports.run = async(bot, message, args) => {
|
|||||||
|
|
||||||
const lockmsg = new Discord.RichEmbed()
|
const lockmsg = new Discord.RichEmbed()
|
||||||
.setDescription(":white_check_mark: **Chat Locked**")
|
.setDescription(":white_check_mark: **Chat Locked**")
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
message.channel.send(lockmsg)
|
message.channel.send(lockmsg);
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Lockchat_Command}`)
|
};
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.Lockchat_Command, true)
|
|
||||||
.addField(`Channel`, message.channel, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Lockchat_Command,
|
name: supportbot.Lockchat_Command,
|
||||||
}
|
};
|
||||||
+11
-22
@@ -1,37 +1,26 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
|
// Created by © 2020 Emerald Services
|
||||||
// Command: Ping
|
// Command: Ping
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const fs = require("fs");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
exports.run = (bot, message, args) => {
|
||||||
message.delete();
|
|
||||||
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Ping_Command}`);
|
||||||
|
|
||||||
const embed = new Discord.RichEmbed()
|
const embed = new Discord.RichEmbed()
|
||||||
.setDescription(`:ping_pong: **Pong!** \`${bot.ping}ms\` `)
|
.setDescription(`:ping_pong: **Pong!** \`${bot.ping}ms\` `)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
message.channel.send(embed).catch(console.error);
|
message.channel.send(embed).catch(console.error);
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Ping_Command}`)
|
};
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.Ping_Command, true)
|
|
||||||
.addField(`Channel`, message.channel, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Ping_Command,
|
name: supportbot.Ping_Command,
|
||||||
}
|
}
|
||||||
+22
-33
@@ -1,60 +1,49 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
|
// Created by © 2020 Emerald Services
|
||||||
// Command: Poll
|
// Command: Poll
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const fs = require("fs");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
exports.run = (bot, message, args) => {
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Poll_Command}`);
|
||||||
|
|
||||||
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
const rolemissing = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
const donothaverole = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
||||||
|
|
||||||
const embed = new Discord.RichEmbed()
|
const embed = new Discord.RichEmbed()
|
||||||
.setTitle(`${bot.settings.Poll_Title}`)
|
.setTitle(`${supportbot.Poll_Title}`)
|
||||||
.setDescription(args.join(" "))
|
.setDescription(args.join(" "))
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
.setFooter(bot.settings.footer, message.author.displayAvatarURL)
|
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL)
|
||||||
|
|
||||||
let ac = message.guild.channels.find(AnnounceChannel => AnnounceChannel.name === `${bot.settings.Poll_Channel}`)
|
let ac = message.guild.channels.find(AnnounceChannel => AnnounceChannel.name === `${supportbot.Poll_Channel}`)
|
||||||
if(!ac) return message.channel.send(`:x: Error! Could not find the logs channel **${bot.settings.Poll_Channel}**`)
|
if(!ac) return message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Poll_Channel}**`)
|
||||||
|
|
||||||
ac.send(embed)
|
ac.send(embed)
|
||||||
|
|
||||||
.then(async function(msg) {
|
.then(async function(msg) {
|
||||||
msg.react(bot.settings.Reaction_Poll_1).then(() => msg.react(bot.settings.Reaction_Poll_2));
|
msg.react(supportbot.Reaction_Poll_1).then(() => msg.react(supportbot.Reaction_Poll_2));
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Poll_Command}`)
|
};
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.Close_Command, true)
|
|
||||||
.addField(`Channel`, message.channel, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Poll_Command,
|
name: supportbot.Poll_Command,
|
||||||
}
|
};
|
||||||
+41
-52
@@ -1,74 +1,63 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
// Command: Remove User
|
// Created by © 2020 Emerald Services
|
||||||
|
// Command: Remove
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const fs = require("fs");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
module.exports.run = async (bot, message, args) => {
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
message.delete()
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Add_Command}`)
|
exports.run = async (bot, message, args) => {
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === bot.settings.staff)
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Remove_Command}`);
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === supportbot.StaffRole)
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if (!staffGroup) return message.reply({embed: rolemissing});
|
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
const rolemissing = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole});
|
if (!staffGroup) return message.reply({embed: rolemissing});
|
||||||
|
|
||||||
const outsideticket = new Discord.RichEmbed()
|
const donothaverole = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!message.channel.name.startsWith(`${bot.settings.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
|
if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole});
|
||||||
|
|
||||||
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
|
const outsideticket = new Discord.RichEmbed()
|
||||||
|
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
|
||||||
|
|
||||||
const cantfinduser = new Discord.RichEmbed()
|
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
|
||||||
.setDescription(`:x: Hmm! Does that user exist? I cannot find the user.`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if(!rUser) return message.channel.send({embed: cantfinduser});
|
|
||||||
|
|
||||||
const channel = message.guild.channels.find(channel => channel.name === message.channel.name);
|
const cantfinduser = new Discord.RichEmbed()
|
||||||
|
.setDescription(`:x: Hmm! Does that user exist? I cannot find the user.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
if(!rUser) return message.channel.send({embed: cantfinduser});
|
||||||
|
|
||||||
const cantfindchannel = new Discord.RichEmbed()
|
const channel = message.guild.channels.find(channel => channel.name === message.channel.name);
|
||||||
.setDescription(`:x: Hmm! Does that ticket exist? I cannot find the ticket channel.`)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
if(!channel) return message.channel.send({embed: cantfindchannel});
|
|
||||||
message.delete().catch(O_o=>{});
|
|
||||||
|
|
||||||
message.channel.overwritePermissions(rUser, { READ_MESSAGES: false, SEND_MESSAGES: false });
|
const cantfindchannel = new Discord.RichEmbed()
|
||||||
|
.setDescription(`:x: Hmm! Does that ticket exist? I cannot find the ticket channel.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
if(!channel) return message.channel.send({embed: cantfindchannel});
|
||||||
|
// message.delete().catch(O_o=>{});
|
||||||
|
|
||||||
const useradded = new Discord.RichEmbed()
|
message.channel.overwritePermissions(rUser, { READ_MESSAGES: false, SEND_MESSAGES: false });
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setDescription(`:white_check_mark: Successfully remove ${rUser} from the ticket.`)
|
|
||||||
.setTimestamp();
|
|
||||||
|
|
||||||
message.channel.send({embed: useradded});
|
const useradded = new Discord.RichEmbed()
|
||||||
console.log(`\x1b[36m`, `${message.author} has successfully removed ${rUser} from ${message.channel}`)
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setTitle("User Removed")
|
||||||
|
.setDescription(`👍 ${rUser} has been removed from this ticket`)
|
||||||
|
.setTimestamp();
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
message.channel.send({embed: useradded});
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.Remove_Command, true)
|
|
||||||
.addField(`Channel`, message.channel, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
};
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Remove_Command,
|
name: supportbot.Remove_Command,
|
||||||
}
|
}
|
||||||
+26
-37
@@ -1,63 +1,52 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
// Command: Close Ticket
|
// Created by © 2020 Emerald Services
|
||||||
|
// Command: Rename
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const fs = require("fs");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === bot.settings.staff)
|
exports.run = async (bot, message, args) => {
|
||||||
|
|
||||||
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Rename_Command}`);
|
||||||
|
|
||||||
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === supportbot.StaffRole)
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
const rolemissing = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.colour)
|
||||||
if (!staffGroup) return message.reply({embed: rolemissing});
|
if (!staffGroup) return message.reply({embed: rolemissing});
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
const donothaverole = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.colour)
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole});
|
if (!message.member.roles.has(staffGroup.id)) return message.reply({embed: donothaverole});
|
||||||
|
|
||||||
const outsideticket = new Discord.RichEmbed()
|
const outsideticket = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
.setDescription(`:x: Cannot use this command becase you are outside a ticket channel.`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.colour)
|
||||||
if (!message.channel.name.startsWith(`${bot.settings.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
|
if (!message.channel.name.startsWith(`${supportbot.Ticket_Channel_Name}-`)) return message.channel.send({embed: outsideticket});
|
||||||
const renameto = args.join(" ")
|
const renameto = args.join(" ")
|
||||||
message.channel.setName(`${bot.settings.Ticket_Channel_Name}-${renameto}`)
|
message.channel.setName(`${supportbot.Ticket_Channel_Name}-${renameto}`)
|
||||||
|
|
||||||
// Renamed Ticket Logistic
|
// Renamed Ticket Logistic
|
||||||
const logEmbed = new Discord.RichEmbed()
|
const logEmbed = new Discord.RichEmbed()
|
||||||
.setTitle(":ticket: Ticket Renamed")
|
.setTitle(":ticket: Ticket Renamed")
|
||||||
.setDescription(`<@${message.author.id}> has renamed a ticket to ${bot.settings.Ticket_Channel_Name}-${renameto}`)
|
.setDescription(`<@${message.author.id}> has renamed a ticket to ${supportbot.Ticket_Channel_Name}-${renameto}`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
.setFooter(bot.settings.footer)
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
|
||||||
let logChannel = message.guild.channels.find(TicketChannel => TicketChannel.name === `${bot.settings.Ticket_Logs}`);
|
let logChannel = message.guild.channels.find(TicketChannel => TicketChannel.name === `${supportbot.Ticket_Logs}`);
|
||||||
if(!logChannel) return message.channel.send(`:x: Error! Could not find the logs channel **${bot.settings.Ticket_Logs}**`);
|
if(!logChannel) return message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Ticket_Logs}**`);
|
||||||
|
|
||||||
logChannel.send({embed: logEmbed})
|
logChannel.send({embed: logEmbed});
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Rename_Command}`)
|
};
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.Rename_Command, true)
|
|
||||||
.addField(`Channel`, message.channel, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Rename_Command,
|
name: supportbot.Rename_Command,
|
||||||
}
|
}
|
||||||
+19
-29
@@ -1,19 +1,24 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
|
// Created by © 2020 Emerald Services
|
||||||
// Command: Report
|
// Command: Report
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const fs = require("fs");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
exports.run = (bot, message, args) => {
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`);
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Report_Command}`);
|
||||||
|
|
||||||
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`);
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
const rolemissing = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour);
|
.setColor(supportbot.EmbedColour);
|
||||||
|
|
||||||
if(!staffGroup) {
|
if(!staffGroup) {
|
||||||
message.reply(rolemissing).catch(err => {
|
message.reply(rolemissing).catch(err => {
|
||||||
@@ -21,8 +26,8 @@ exports.run = (bot, message, args) => {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const donothaverole = new Discord.RichEmbed()
|
const donothaverole = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if(!message.member.roles.has(staffGroup.id)) {
|
if(!message.member.roles.has(staffGroup.id)) {
|
||||||
message.reply(donothaverole);
|
message.reply(donothaverole);
|
||||||
} else {
|
} else {
|
||||||
@@ -34,42 +39,27 @@ exports.run = (bot, message, args) => {
|
|||||||
} else {
|
} else {
|
||||||
let reportDesc = args.slice(1).join(" ");
|
let reportDesc = args.slice(1).join(" ");
|
||||||
const embed = new Discord.RichEmbed()
|
const embed = new Discord.RichEmbed()
|
||||||
.setTitle(`${bot.settings.Report_Title}`)
|
.setTitle(`${supportbot.Report_Title}`)
|
||||||
.setThumbnail(message.author.avatarURL)
|
.setThumbnail(message.author.avatarURL)
|
||||||
.addField("Report by:", `<@${message.author.id}>`, false)
|
.addField("Report by:", `<@${message.author.id}>`, false)
|
||||||
.addField("Description:", `${reportDesc}`, false)
|
.addField("Description:", `${reportDesc}`, false)
|
||||||
.addField("Reported User:", `${args[0]}`, false)
|
.addField("Reported User:", `${args[0]}`, false)
|
||||||
.setTimestamp(new Date())
|
.setTimestamp(new Date())
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL);
|
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL);
|
||||||
let rc = message.guild.channels.find(ReportChannel => ReportChannel.name === `${bot.settings.Report_Channel}`)
|
let rc = message.guild.channels.find(ReportChannel => ReportChannel.name === `${supportbot.Report_Channel}`)
|
||||||
if(!rc) {
|
if(!rc) {
|
||||||
message.channel.send(`:x: Error! Could not find the logs channel **${bot.settings.Report_Channel}**`);
|
message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Report_Channel}**`);
|
||||||
} else {
|
} else {
|
||||||
rc.send(embed);
|
rc.send(embed);
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Report_Command}`);
|
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.Report_Command, true)
|
|
||||||
.addField(`Channel`, message.channel, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Report_Command
|
name: supportbot.Report_Command
|
||||||
}
|
}
|
||||||
+17
-27
@@ -1,52 +1,42 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
|
// Created by © 2020 Emerald Services
|
||||||
// Command: Say
|
// Command: Say
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const fs = require("fs");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
exports.run = (bot, message, args) => {
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Say_Command}`);
|
||||||
|
|
||||||
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
const rolemissing = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
const donothaverole = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
||||||
|
|
||||||
const embed = new Discord.RichEmbed()
|
const embed = new Discord.RichEmbed()
|
||||||
.setTitle(`${bot.settings.Announcement_Title}`)
|
.setTitle(`${supportbot.Announcement_Title}`)
|
||||||
.setDescription(args.join(" "))
|
.setDescription(args.join(" "))
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL)
|
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL)
|
||||||
|
|
||||||
message.channel.send(embed);
|
message.channel.send(embed);
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Say_Command}`)
|
};
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.Say_Command, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Say_Command,
|
name: supportbot.Say_Command,
|
||||||
}
|
}
|
||||||
+19
-30
@@ -1,53 +1,42 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
// Command: Suggest
|
// Created by © 2020 Emerald Services
|
||||||
|
// Command: Say
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const fs = require("fs");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = async(bot, message, args) => {
|
exports.run = async(bot, message, args) => {
|
||||||
message.delete();
|
|
||||||
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Suggest_Command}`);
|
||||||
|
|
||||||
const SuggestionEmbed = new Discord.RichEmbed()
|
const SuggestionEmbed = new Discord.RichEmbed()
|
||||||
.setTitle(`${bot.settings.Suggestion_Title}`)
|
.setTitle(`${supportbot.Suggestion_Title}`)
|
||||||
.setDescription(`\`\`\`${args.join(" ")}\`\`\`\nFrom <@${message.author.id}>`)
|
.setDescription(`\`\`\`${args.join(" ")}\`\`\`\nFrom <@${message.author.id}>`)
|
||||||
.setFooter(`${bot.settings.footer}`, message.author.avatarURL)
|
.setFooter(`${supportbot.footer}`, message.author.avatarURL)
|
||||||
.setTimestamp(new Date())
|
.setTimestamp(new Date())
|
||||||
.setColor(bot.settings.colour);
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
let sc = message.guild.channels.find(SuggestionChannel => SuggestionChannel.name === `${bot.settings.Suggestion_Channel}`);
|
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 **${bot.settings.Suggestion_Channel}**`);
|
if(!sc) return message.channel.send(`:x: Error! Could not find the suggestion channel **${supportbot.Suggestion_Channel}**`);
|
||||||
|
|
||||||
sc.send(SuggestionEmbed)
|
sc.send(SuggestionEmbed)
|
||||||
|
|
||||||
.then(async function(msg) {
|
.then(async function(msg) {
|
||||||
msg.react(bot.settings.suggestyes).then(() => msg.react(bot.settings.suggestno));
|
msg.react(supportbot.suggestyes).then(() => msg.react(supportbot.suggestno));
|
||||||
});
|
});
|
||||||
|
|
||||||
const SuggestionSuccessEmbed = new Discord.RichEmbed()
|
const SuggestionSuccessEmbed = new Discord.RichEmbed()
|
||||||
.setDescription(`:white_check_mark: You have successfully created your suggestion. <#${sc.id}>`)
|
.setDescription(`👍 Suggestion has been successfully created\nYou can view your suggestion in <#${sc.id}>`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
message.channel.send(SuggestionSuccessEmbed);
|
message.channel.send(SuggestionSuccessEmbed);
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Suggest_Command}`)
|
};
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.Suggest_Command, true)
|
|
||||||
.addField(`Channel`, message.channel, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**`);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Suggest_Command,
|
name: supportbot.Suggest_Command,
|
||||||
}
|
}
|
||||||
+38
-48
@@ -1,33 +1,38 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
// Command: Ticket
|
// Created by © 2020 Emerald Services
|
||||||
|
// Command: Say
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const fs = require("fs");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
exports.run = (bot, message, args) => {
|
||||||
message.delete();
|
|
||||||
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.Ticket_Command}`);
|
||||||
|
|
||||||
const ID = Math.floor(Math.random() * 10) + 2000;
|
const ID = Math.floor(Math.random() * 10) + 2000;
|
||||||
const subject = args.join(" ") || `${bot.settings.Default_Ticket_Reason}`;
|
const subject = args.join(" ") || `${supportbot.Default_Ticket_Reason}`;
|
||||||
|
|
||||||
const alreadyopen = new Discord.RichEmbed()
|
const alreadyopen = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Cannot create a ticket because **${bot.settings.Ticket_Channel_Name}-${message.author.username}** already exists.`)
|
.setDescription(`:x: Cannot create a ticket because **${supportbot.Ticket_Channel_Name}-${ID}** already exists.`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
if (message.guild.channels.find(TicketChannel => TicketChannel.name === `${bot.settings.Ticket_Channel_Name}-` + message.author.username)) return message.channel.send(alreadyopen);
|
if (message.guild.channels.find(TicketChannel => TicketChannel.name === `${supportbot.Ticket_Channel_Name}-` + message.author.username)) return message.channel.send(alreadyopen);
|
||||||
|
|
||||||
message.guild.createChannel(`${bot.settings.Ticket_Channel_Name}-${message.author.username}`, {
|
message.guild.createChannel(`${supportbot.Ticket_Channel_Name}-${ID}`, {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
}).then(TicketChannel => {
|
}).then(TicketChannel => {
|
||||||
|
|
||||||
// Roles
|
// Roles
|
||||||
let staff = message.guild.roles.find(supportRole => supportRole.name === `${bot.settings.staff}`)
|
let staff = message.guild.roles.find(supportRole => supportRole.name === `${supportbot.StaffRole}`)
|
||||||
let everyone = message.guild.roles.find(everyoneRole => everyoneRole.name === "@everyone")
|
let everyone = message.guild.roles.find(everyoneRole => everyoneRole.name === "@everyone")
|
||||||
let department = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${bot.settings.Department_Role_1}`)
|
let department = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_1}`)
|
||||||
let department2 = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${bot.settings.Department_Role_2}`)
|
let department2 = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_2}`)
|
||||||
let department3 = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${bot.settings.Department_Role_3}`)
|
let department3 = message.guild.roles.find(DepartmentRole => DepartmentRole.name === `${supportbot.Department_Role_3}`)
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
TicketChannel.overwritePermissions(everyone, { SEND_MESSAGES: false, READ_MESSAGES: false })
|
TicketChannel.overwritePermissions(everyone, { SEND_MESSAGES: false, READ_MESSAGES: false })
|
||||||
@@ -39,12 +44,12 @@ exports.run = (bot, message, args) => {
|
|||||||
TicketChannel.overwritePermissions(bot.user, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
TicketChannel.overwritePermissions(bot.user, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
||||||
|
|
||||||
// Category
|
// Category
|
||||||
let category = message.guild.channels.find(c => c.name === bot.settings.category);
|
let category = message.guild.channels.find(c => c.name === supportbot.category);
|
||||||
if (category) {
|
if (category) {
|
||||||
TicketChannel.setParent(category.id);
|
TicketChannel.setParent(category.id);
|
||||||
} else {
|
} else {
|
||||||
if (message.guild.channels.get(bot.settings.category)) {
|
if (message.guild.channels.get(supportbot.category)) {
|
||||||
TicketChannel.setParent(message.guild.channels.get(bot.settings.category).id);
|
TicketChannel.setParent(message.guild.channels.get(supportbot.category).id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,24 +57,24 @@ exports.run = (bot, message, args) => {
|
|||||||
.setTitle(":white_check_mark: Support Ticket Created")
|
.setTitle(":white_check_mark: Support Ticket Created")
|
||||||
.setDescription(`<@${message.author.id}> your support ticket created successfully`)
|
.setDescription(`<@${message.author.id}> your support ticket created successfully`)
|
||||||
.addField("Your Ticket:", `<#${TicketChannel.id}>`)
|
.addField("Your Ticket:", `<#${TicketChannel.id}>`)
|
||||||
.setColor(bot.settings.Ticket_Colour)
|
.setColor(supportbot.Ticket_Colour)
|
||||||
message.channel.send({embed: ticketopened});
|
message.channel.send({embed: ticketopened});
|
||||||
// Ticket Message - ( Able to edit this message via the settings.json file )
|
// Ticket Message - ( Able to edit this message via the settings.json file )
|
||||||
const ticketMessage = `Hi! <@${message.author.id}>\n${bot.settings.Ticket_Message}`;
|
const ticketMessage = `Hi! <@${message.author.id}>\n${supportbot.Ticket_Message}`;
|
||||||
|
|
||||||
const Department_1 = bot.settings.Ticket_Department_1;
|
const Department_1 = supportbot.Ticket_Department_1;
|
||||||
const Department_2 = bot.settings.Ticket_Department_2;
|
const Department_2 = supportbot.Ticket_Department_2;
|
||||||
const Department_3 = bot.settings.Ticket_Department_3;
|
const Department_3 = supportbot.Ticket_Department_3;
|
||||||
|
|
||||||
const Emoji_1 = bot.settings.Ticket_Department_Emoji_1;
|
const Emoji_1 = supportbot.Ticket_Department_Emoji_1;
|
||||||
const Emoji_2 = bot.settings.Ticket_Department_Emoji_2;
|
const Emoji_2 = supportbot.Ticket_Department_Emoji_2;
|
||||||
const Emoji_3 = bot.settings.Ticket_Department_Emoji_3;
|
const Emoji_3 = supportbot.Ticket_Department_Emoji_3;
|
||||||
|
|
||||||
const TicketMessage = new Discord.RichEmbed()
|
const TicketMessage = new Discord.RichEmbed()
|
||||||
.setDescription(ticketMessage, true)
|
.setDescription(ticketMessage, true)
|
||||||
.addField("Available Departments", `${Emoji_1} ${Department_1}\n${Emoji_2} ${Department_2}\n${Emoji_3} ${Department_3}`)
|
.addField("Available Departments", `${Emoji_1} ${Department_1}\n${Emoji_2} ${Department_2}\n${Emoji_3} ${Department_3}`)
|
||||||
.setColor(bot.settings.Ticket_Colour)
|
.setColor(supportbot.Ticket_Colour)
|
||||||
.setFooter(bot.settings.footer)
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
|
||||||
if (subject != 'No Subject.') {
|
if (subject != 'No Subject.') {
|
||||||
TicketMessage.addField("Reason", subject);
|
TicketMessage.addField("Reason", subject);
|
||||||
@@ -119,37 +124,22 @@ exports.run = (bot, message, args) => {
|
|||||||
.addField("Ticket ID", ID, true)
|
.addField("Ticket ID", ID, true)
|
||||||
.addField("User", `<@${message.author.id}>`, true)
|
.addField("User", `<@${message.author.id}>`, true)
|
||||||
.addField("Channel", `ticket#${ID}`, true)
|
.addField("Channel", `ticket#${ID}`, true)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
.setFooter(bot.settings.footer)
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
|
||||||
if (subject != 'No Subject.') {
|
if (subject != 'No Subject.') {
|
||||||
logEmbed.addField('Subject', subject, true);
|
logEmbed.addField('Subject', subject, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
let logChannel = message.guild.channels.find(TicketChannel => TicketChannel.name === `${bot.settings.Ticket_Logs}`);
|
let logChannel = message.guild.channels.find(TicketChannel => TicketChannel.name === `${supportbot.Ticket_Logs}`);
|
||||||
if(!logChannel) return message.channel.send(`:x: Error! Could not find the logs channel **${bot.settings.Ticket_Logs}**`);
|
if(!logChannel) return message.channel.send(`:x: Error! Could not find the logs channel **${supportbot.Ticket_Logs}**`);
|
||||||
|
|
||||||
logChannel.send({embed: logEmbed})
|
logChannel.send({embed: logEmbed})
|
||||||
|
|
||||||
}).catch(err=>{console.error(err)});
|
}).catch(err=>{console.error(err)});
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Ticket_Command}`)
|
};
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.Ticket_Command, true)
|
|
||||||
.addField(`Channel`, message.channel, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Ticket_Command,
|
name: supportbot.Ticket_Command,
|
||||||
}
|
};
|
||||||
+20
-30
@@ -1,52 +1,42 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
// Command: Lockchat
|
// Created by © 2020 Emerald Services
|
||||||
|
// Command: Say
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
const fs = require("fs");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
exports.run = async(bot, message, args) => {
|
exports.run = async(bot, message, args) => {
|
||||||
message.delete();
|
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
console.log(`\u001b[33m`, `[${supportbot.Bot_Name}] > `, `\u001b[31;1m`, `${message.author.tag}`, `\u001b[32;1m`, `has executed`, `\u001b[31;1m`, `${supportbot.Prefix}${supportbot.UnLockchat_Command}`);
|
||||||
let lockedRole = message.guild.roles.find(lc => lc.name === `${bot.settings.locked_role}`)
|
|
||||||
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${supportbot.StaffRole}`)
|
||||||
|
let lockedRole = message.guild.roles.find(lc => lc.name === `${supportbot.locked_role}`)
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
const rolemissing = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Looks like this server doesn't have the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
||||||
|
|
||||||
const donothaverole = new Discord.RichEmbed()
|
const donothaverole = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Sorry! You cannot use this command with the role **${supportbot.StaffRole}**`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour)
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
||||||
|
|
||||||
message.channel.overwritePermissions(lockedRole, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
message.channel.overwritePermissions(lockedRole, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
||||||
message.channel.overwritePermissions(staffGroup, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
message.channel.overwritePermissions(staffGroup, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
||||||
|
|
||||||
const lockmsg = new Discord.RichEmbed()
|
const lockmsg = new Discord.RichEmbed()
|
||||||
.setDescription(":white_check_mark: **Chat Un-Locked**")
|
.setDescription(":white_check_mark: **Chat Un-Locked**")
|
||||||
.setColor(bot.settings.colour)
|
.setColor(supportbot.EmbedColour);
|
||||||
message.channel.send(lockmsg)
|
message.channel.send(lockmsg);
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.UnLockchat_Command}`)
|
};
|
||||||
|
|
||||||
const CMDLog = new Discord.RichEmbed()
|
|
||||||
.setTitle(bot.settings.Commands_Log_Title)
|
|
||||||
.addField(`User`, `<@${message.author.id}>`)
|
|
||||||
.addField(`Command`, bot.settings.UnLockchat_Command, true)
|
|
||||||
.addField(`Executed At`, message.createdAt, true)
|
|
||||||
.setColor(bot.settings.colour)
|
|
||||||
.setFooter(bot.settings.footer)
|
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
|
||||||
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
|
||||||
|
|
||||||
CommandLog.send(CMDLog);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.UnLockchat_Command,
|
name: supportbot.UnLockchat_Command,
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,6 @@ const fs = require("fs");
|
|||||||
const bot = new Discord.Client();
|
const bot = new Discord.Client();
|
||||||
|
|
||||||
bot.commands = new Discord.Collection();
|
bot.commands = new Discord.Collection();
|
||||||
bot.settings = require("./settings.json");
|
|
||||||
|
|
||||||
const yaml = require('js-yaml');
|
const yaml = require('js-yaml');
|
||||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
@@ -55,36 +54,37 @@ bot.on("ready", async () => {
|
|||||||
console.log(`\u001b[37m`, `Invite your bot with https://discordapp.com/api/oauth2/authorize?client_id=516372960110444574&permissions=8&scope=bot`)
|
console.log(`\u001b[37m`, `Invite your bot with https://discordapp.com/api/oauth2/authorize?client_id=516372960110444574&permissions=8&scope=bot`)
|
||||||
console.log(`\u001b[37m`, `© ️SupportBot created by Emerald Services`)
|
console.log(`\u001b[37m`, `© ️SupportBot created by Emerald Services`)
|
||||||
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
|
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
|
||||||
console.log(`\u001b[43;1m \u001b[37m \u001b[1m`, `If you require any assistance you can contact us at discord, https://discord.gg/tNt95Ba`)
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.on("message", async message => {
|
bot.on("message", async message => {
|
||||||
if(message.author.bot) return;
|
if(message.author.bot) return;
|
||||||
if(message.channel.type === "dm") return;
|
if(message.channel.type === "dm") return;
|
||||||
if (message.content.indexOf(supportbot.Prefix) !== 0) return;
|
if (message.content.indexOf(supportbot.Prefix) !== 0) return;
|
||||||
|
|
||||||
let messageArray = message.content.split(" ");
|
let messageArray = message.content.split(" ");
|
||||||
const args = message.content.slice(supportbot.Prefix.length).trim().split(/ +/g);
|
const args = message.content.slice(supportbot.Prefix.length).trim().split(/ +/g);
|
||||||
const command = args.shift().toLowerCase();
|
const command = args.shift().toLowerCase();
|
||||||
|
|
||||||
const cmd = bot.commands.get(command);
|
const cmd = bot.commands.get(command);
|
||||||
if(!cmd) return;
|
if(!cmd) return;
|
||||||
cmd.run(bot, message, args);
|
cmd.run(bot, message, args);
|
||||||
|
message.delete();
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.on("message", async message => {
|
bot.on("message", async message => {
|
||||||
if(message.author.bot) return;
|
if(message.author.bot) return;
|
||||||
if(message.channel.type === "dm") return;
|
if(message.channel.type === "dm") return;
|
||||||
if (message.content.indexOf(supportbot.Prefix) !== 0) return;
|
if (message.content.indexOf(supportbot.Prefix) !== 0) return;
|
||||||
|
|
||||||
let messageArray = message.content.split(" ");
|
let messageArray = message.content.split(" ");
|
||||||
const args = message.content.slice(supportbot.Prefix.length).trim().split(/ +/g);
|
const args = message.content.slice(supportbot.Prefix.length).trim().split(/ +/g);
|
||||||
const addon = args.shift().toLowerCase();
|
const addon = args.shift().toLowerCase();
|
||||||
|
|
||||||
const cmd = bot.addons.get(addon);
|
const cmd = bot.addons.get(addon);
|
||||||
if(!cmd) return;
|
if(!cmd) return;
|
||||||
cmd.run(bot, message, args);
|
cmd.run(bot, message, args);
|
||||||
|
message.delete();
|
||||||
});
|
});
|
||||||
|
|
||||||
// [SupportBot] Welcome Message && Auto Join Role
|
// [SupportBot] Welcome Message && Auto Join Role
|
||||||
|
|||||||
@@ -0,0 +1,92 @@
|
|||||||
|
{
|
||||||
|
"SupportBot": "v5.1",
|
||||||
|
|
||||||
|
"token": "BOT_TOKEN_HERE",
|
||||||
|
"prefix": "-",
|
||||||
|
"botname": "SupportBot",
|
||||||
|
"colour": "#13bd2a",
|
||||||
|
"footer": "Support Bot, By Emerald Services",
|
||||||
|
"BotStatus": "Support Bot",
|
||||||
|
|
||||||
|
"staff": "Staff",
|
||||||
|
|
||||||
|
"locked_role": "@everyone",
|
||||||
|
"everyone": "@everyone",
|
||||||
|
"Auto_Role": "Member",
|
||||||
|
|
||||||
|
"Department_Role_1": "Support",
|
||||||
|
"Department_Role_2": "Security",
|
||||||
|
"Department_Role_3": "Sales",
|
||||||
|
|
||||||
|
"category": "Tickets",
|
||||||
|
"Ticket_Channel_Name": "ticket",
|
||||||
|
"Ticket_Message": "Your support ticket has been opened successfully\nPlease allow us some time to reach out to you.",
|
||||||
|
"Ticket_Logs": "ticket-logs",
|
||||||
|
"Default_Ticket_Reason": "No Subject",
|
||||||
|
|
||||||
|
"Ticket_Colour": "#000e42",
|
||||||
|
"Transcript_Logs": "ticket-data",
|
||||||
|
"Transcript_Title": "Support Transcript",
|
||||||
|
"Ticket_Closing": "Your ticket is currently closing",
|
||||||
|
|
||||||
|
"Ticket_Department_1": "Support",
|
||||||
|
"Ticket_Department_2": "Security",
|
||||||
|
"Ticket_Department_3": "Sales",
|
||||||
|
|
||||||
|
"Ticket_Department_Emoji_1": "🎧",
|
||||||
|
"Ticket_Department_Emoji_2": "🔐",
|
||||||
|
"Ticket_Department_Emoji_3": "💵",
|
||||||
|
|
||||||
|
"Commands_Log_Title": "SupportBot Logs",
|
||||||
|
"Command_Log_Channel": "command-logs",
|
||||||
|
|
||||||
|
"Announcement_Title": "SupportBot Announcement",
|
||||||
|
"Announcement_Channel": "announcements",
|
||||||
|
"Announcement_Tag_Role": "@everyone",
|
||||||
|
|
||||||
|
"Welcome_Message": "Welcome to the server!",
|
||||||
|
"Welcome_Channel": "welcome",
|
||||||
|
|
||||||
|
"Leave_Message": "Thank you for visiting us!",
|
||||||
|
"Leave_Channel": "welcome",
|
||||||
|
|
||||||
|
"Poll_Channel": "polls",
|
||||||
|
"Poll_Title": "📊 Polls",
|
||||||
|
"Reaction_Poll_1": "✅",
|
||||||
|
"Reaction_Poll_2": "❎",
|
||||||
|
|
||||||
|
"Suggestion_Title": "SupportBot Suggestions",
|
||||||
|
"Suggestion_Channel": "suggestions",
|
||||||
|
"suggestyes": "✅",
|
||||||
|
"suggestno": "❎",
|
||||||
|
|
||||||
|
"Report_Channel": "reports",
|
||||||
|
"Report_Title": "SupportBot Report",
|
||||||
|
|
||||||
|
"LINKS_TITLE": "SupportBot Links",
|
||||||
|
|
||||||
|
"LINKS": {
|
||||||
|
"Discord": "https://discord.gg/",
|
||||||
|
"Twitter": "https://twitter.com/",
|
||||||
|
"Website": "https://example.com/",
|
||||||
|
"AddMore": "AddMoreIfYouWant"
|
||||||
|
},
|
||||||
|
|
||||||
|
"Announcement_Command": "announce",
|
||||||
|
"Say_Command": "say",
|
||||||
|
"Suggest_Command": "suggest",
|
||||||
|
"Ping_Command": "ping",
|
||||||
|
"Ticket_Command": "ticket",
|
||||||
|
"Remove_Command": "remove",
|
||||||
|
"Add_Command": "add",
|
||||||
|
"Close_Command": "close",
|
||||||
|
"Forceclose_Command": "forceclose",
|
||||||
|
"Rename_Command": "rename",
|
||||||
|
"Help_Command": "help",
|
||||||
|
"Link_Command": "links",
|
||||||
|
"Lockchat_Command": "lock",
|
||||||
|
"UnLockchat_Command": "unlock",
|
||||||
|
"Poll_Command": "poll",
|
||||||
|
"Report_Command": "report",
|
||||||
|
"Setup_Command": "setup"
|
||||||
|
}
|
||||||
Generated
+76
-1
@@ -1,5 +1,80 @@
|
|||||||
{
|
{
|
||||||
"name": "SupportBot",
|
"name": "SupportBot",
|
||||||
"version": "4.0",
|
"version": "4.0",
|
||||||
"lockfileVersion": 1
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"argparse": {
|
||||||
|
"version": "1.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||||
|
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||||
|
"requires": {
|
||||||
|
"sprintf-js": "~1.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"async-limiter": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
|
||||||
|
},
|
||||||
|
"discord.js": {
|
||||||
|
"version": "11.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.5.1.tgz",
|
||||||
|
"integrity": "sha512-tGhV5xaZXE3Z+4uXJb3hYM6gQ1NmnSxp9PClcsSAYFVRzH6AJH74040mO3afPDMWEAlj8XsoPXXTJHTxesqcGw==",
|
||||||
|
"requires": {
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"prism-media": "^0.0.3",
|
||||||
|
"snekfetch": "^3.6.4",
|
||||||
|
"tweetnacl": "^1.0.0",
|
||||||
|
"ws": "^6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"esprima": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||||
|
},
|
||||||
|
"js-yaml": {
|
||||||
|
"version": "3.13.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
|
||||||
|
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
|
||||||
|
"requires": {
|
||||||
|
"argparse": "^1.0.7",
|
||||||
|
"esprima": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"long": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
|
||||||
|
},
|
||||||
|
"prism-media": {
|
||||||
|
"version": "0.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.3.tgz",
|
||||||
|
"integrity": "sha512-c9KkNifSMU/iXT8FFTaBwBMr+rdVcN+H/uNv1o+CuFeTThNZNTOrQ+RgXA1yL/DeLk098duAeRPP3QNPNbhxYQ=="
|
||||||
|
},
|
||||||
|
"snekfetch": {
|
||||||
|
"version": "3.6.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz",
|
||||||
|
"integrity": "sha512-NjxjITIj04Ffqid5lqr7XdgwM7X61c/Dns073Ly170bPQHLm6jkmelye/eglS++1nfTWktpP6Y2bFXjdPlQqdw=="
|
||||||
|
},
|
||||||
|
"sprintf-js": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
|
||||||
|
},
|
||||||
|
"tweetnacl": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-+8aPRjmXgf1VqvyxSlBUzKzeYqVS9Ai8vZ28g+mL7dNQl1jlUTCMDZnvNQdAS1xTywMkIXwJsfipsR/6s2+syw=="
|
||||||
|
},
|
||||||
|
"ws": {
|
||||||
|
"version": "6.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
|
||||||
|
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
|
||||||
|
"requires": {
|
||||||
|
"async-limiter": "~1.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"array-sort": "^1.0.0",
|
"array-sort": "^1.0.0",
|
||||||
"discord.js": "^11.5.1",
|
"discord.js": "^11.5.1",
|
||||||
|
"js-yaml": "^3.13.1",
|
||||||
"table": "^5.4.4"
|
"table": "^5.4.4"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ const Discord = require("discord.js");
|
|||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client()
|
||||||
const someaddon = new Discord.Client()
|
const someaddon = new Discord.Client()
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
|
||||||
someaddon.settings = require("./settings/someaddon.json");
|
someaddon.settings = require("./settings/someaddon.json");
|
||||||
|
|
||||||
exports.run = async(bot, message, args) => {
|
exports.run = async(bot, message, args) => {
|
||||||
|
|||||||
+28
-15
@@ -1,11 +1,25 @@
|
|||||||
|
# _________ __ __________ __
|
||||||
|
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
||||||
|
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
||||||
|
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
||||||
|
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
||||||
|
# \/ |__| |__| \/
|
||||||
|
#
|
||||||
|
# SupportBot v5.1.0
|
||||||
|
# Created by © 2020 Emerald Services
|
||||||
|
# License: MIT
|
||||||
|
|
||||||
#Bot Indentification
|
#Bot Indentification
|
||||||
Token: ""
|
Token: "Bot_Token_Here"
|
||||||
Prefix: "!"
|
Prefix: "!"
|
||||||
Bot_Name: "SupportBot"
|
Bot_Name: "SupportBot"
|
||||||
|
|
||||||
BotActivity: "SupportBot v5.1"
|
BotActivity: "SupportBot v5.1"
|
||||||
ActivityType: "PLAYING"
|
ActivityType: "PLAYING"
|
||||||
|
|
||||||
|
EmbedColour: "#4bbf5c"
|
||||||
|
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
|
||||||
|
|
||||||
# Role Settings
|
# Role Settings
|
||||||
AutoRole: "Member"
|
AutoRole: "Member"
|
||||||
StaffRole: "Support"
|
StaffRole: "Support"
|
||||||
@@ -72,12 +86,11 @@ Report_Title: "SupportBot Report"
|
|||||||
# Link Settings
|
# Link Settings
|
||||||
LINKS_TITLE: "SupportBot Links"
|
LINKS_TITLE: "SupportBot Links"
|
||||||
|
|
||||||
LINKS: {
|
LINKS:
|
||||||
Discord: "https://discord.gg/",
|
"Discord": "https://discord.gg/"
|
||||||
Twitter: "https://twitter.com/",
|
"Twitter": "https://twitter.com/"
|
||||||
Website: "https://example.com/",
|
"Website": "https://example.com/"
|
||||||
AddMore: "AddMoreIfYouWant"
|
"AddMore": "AddMoreIfYouWant"
|
||||||
},
|
|
||||||
|
|
||||||
# Bot Command Settings
|
# Bot Command Settings
|
||||||
Add_Command: "add"
|
Add_Command: "add"
|
||||||
@@ -89,11 +102,11 @@ Rename_Command: "rename"
|
|||||||
Lockchat_Command: "lock"
|
Lockchat_Command: "lock"
|
||||||
UnLockchat_Command: "unlock"
|
UnLockchat_Command: "unlock"
|
||||||
Announcement_Command: "announce"
|
Announcement_Command: "announce"
|
||||||
Say_Command": "say"
|
Say_Command: "say"
|
||||||
Suggest_Command": "suggest"
|
Suggest_Command: "suggest"
|
||||||
Ping_Command": "ping"
|
Ping_Command: "ping"
|
||||||
Help_Command": "help"
|
Help_Command: "help"
|
||||||
Link_Command": "links"
|
Link_Command: "links"
|
||||||
Poll_Command": "poll"
|
Poll_Command: "poll"
|
||||||
Report_Command": "report"
|
Report_Command: "report"
|
||||||
Setup_Command": "setup"
|
Setup_Command: "setup"
|
||||||
Reference in new issue
Block a user