Updated
This commit is contained in:
1 parent
17c49b2b03
commit
e3576b17b1
14 files changed
+145
-49
No files matched your search
+12
-9
@@ -9,22 +9,25 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: supportbot.AddUser,
|
name: supportbot.AddUser,
|
||||||
|
description: supportbot.AddUserDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
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(staffRole => staffRole.name === supportbot.Staff);
|
let SupportStaff = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.Staff, supportbot.Admin);
|
||||||
|
|
||||||
const NoPerms = new Discord.MessageEmbed()
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
.setTitle("Invalid Permissions!")
|
.setTitle("Invalid Permissions!")
|
||||||
.setDescription(`:warning: **Err!** You do not have the correct permissions to use this command.\n\nRole Required: \`${supportbot.SupportStaff}\``)
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
|
||||||
.setColor(supportbot.WarningColour)
|
.setColor(supportbot.ErrorColour)
|
||||||
message.channel.send({ embed: NoPerms });
|
|
||||||
|
if (!message.member.roles.cache.has(SupportStaff.id))
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
||||||
const Exists = new Discord.MessageEmbed()
|
const Exists = new Discord.MessageEmbed()
|
||||||
.setTitle("Incorrect Channel")
|
.setTitle("No Ticket Found!")
|
||||||
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
|
.setDescription(`${supportbot.NoValidTicket}`)
|
||||||
.setColor(supportbot.WarningColour);
|
.setColor(supportbot.WarningColour);
|
||||||
message.channel.send({ embed: Exists });
|
message.channel.send({ embed: Exists });
|
||||||
|
|
||||||
@@ -34,8 +37,8 @@ module.exports = {
|
|||||||
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
|
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
|
||||||
const UserNotExist = new Discord.MessageEmbed()
|
const UserNotExist = new Discord.MessageEmbed()
|
||||||
.setTitle("User Not Found!")
|
.setTitle("User Not Found!")
|
||||||
.setDescription(`:x: **Error!** This user doesn't exist, Are they in this server?\n\nTry Again:\`${supportbot.Prefix}${supportbot.AddUser} <user#0000>\``)
|
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.AddUser} <user#0000>\``)
|
||||||
.setColor(supportbot.ErrorColor)
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
if (!rUser) return message.channel.send({ embed: UserNotExist });
|
if (!rUser) return message.channel.send({ embed: UserNotExist });
|
||||||
|
|
||||||
@@ -48,7 +51,7 @@ module.exports = {
|
|||||||
|
|
||||||
const Complete = new Discord.MessageEmbed()
|
const Complete = new Discord.MessageEmbed()
|
||||||
.setTitle("User Added!")
|
.setTitle("User Added!")
|
||||||
.setDescription(`👍 ${rUser} has been added to this ticket`)
|
.setDescription(supportbot.AddedUser.replace(/%user%/g, rUser.id))
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
message.channel.send({ embed: Complete });
|
message.channel.send({ embed: Complete });
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: supportbot.AnnounceCommand,
|
name: supportbot.AnnounceCommand,
|
||||||
|
description: supportbot.AnnounceDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ module.exports = {
|
|||||||
|
|
||||||
const errornochannel = new Discord.MessageEmbed()
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
.setTitle("Invalid Channel")
|
.setTitle("Invalid Channel")
|
||||||
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.AnnouncementChannel}`)
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.AnnouncementChannel}`)
|
||||||
.setColor(supportbot.ErrorColour);
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||||
@@ -26,9 +27,11 @@ module.exports = {
|
|||||||
|
|
||||||
const NoPerms = new Discord.MessageEmbed()
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
.setTitle("Invalid Permissions!")
|
.setTitle("Invalid Permissions!")
|
||||||
.setDescription(`:warning: **Err!** You do not have the correct permissions to use this command.\n\nRole Required: \`${supportbot.serverAdmins}\``)
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${serverAdmins.name}\``)
|
||||||
.setColor(supportbot.WarningColour)
|
.setColor(supportbot.WarningColour)
|
||||||
message.channel.send({ embed: NoPerms });
|
|
||||||
|
if (!message.member.roles.cache.has(serverAdmins.id))
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
const embed = new Discord.MessageEmbed()
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
// SupportBot 6.0, Created by Emerald Services
|
||||||
|
// Say Command
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const { execute } = require("./help");
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.BotSay,
|
||||||
|
description: supportbot.BotSayDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff);
|
||||||
|
|
||||||
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Permissions!")
|
||||||
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (!message.member.roles.cache.has(SupportStaff.id))
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
|
|
||||||
|
const embed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> **What would you like me to say!**`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({ embed: embed });
|
||||||
|
|
||||||
|
let announcement = []
|
||||||
|
message.channel.awaitMessages(response => response.content.length > 2, {
|
||||||
|
max: 1,
|
||||||
|
time: 500000,
|
||||||
|
errors: ['time'],
|
||||||
|
}).then((collected) => {
|
||||||
|
announcement.push(collected.map(r => r.content));
|
||||||
|
|
||||||
|
const AnnouncementEmbed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(announcement)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
message.channel.send({ embed: AnnouncementEmbed })
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
+3
-2
@@ -10,14 +10,15 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: supportbot.CloseTicket,
|
name: supportbot.CloseTicket,
|
||||||
|
description: supportbot.CloseTicketDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
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}-` )) {
|
||||||
const Exists = new Discord.MessageEmbed()
|
const Exists = new Discord.MessageEmbed()
|
||||||
.setTitle("Incorrect Channel")
|
.setTitle("No Ticket Found!")
|
||||||
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
|
.setDescription(`${supportbot.NoValidTicket}`)
|
||||||
.setColor(supportbot.WarningColour);
|
.setColor(supportbot.WarningColour);
|
||||||
message.channel.send({ embed: Exists });
|
message.channel.send({ embed: Exists });
|
||||||
|
|
||||||
|
|||||||
+23
-15
@@ -9,26 +9,24 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: supportbot.HelpCommand,
|
name: supportbot.HelpCommand,
|
||||||
|
description: supportbot.HelpDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
let generalCommands = "";
|
let generalCommands = "";
|
||||||
generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** Lists all the bot commands\n`;
|
generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** ${supportbot.HelpDesc}\n`;
|
||||||
generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** Get some important links\n`;
|
generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** ${supportbot.LinkDesc}\n`;
|
||||||
generalCommands += `**${supportbot.Prefix}${supportbot.SuggestCommand}** Create a new suggestion\n`;
|
generalCommands += `**${supportbot.Prefix}${supportbot.SuggestCommand}** ${supportbot.SuggestionDesc}\n`;
|
||||||
generalCommands += `**${supportbot.Prefix}${supportbot.PingCommand}** Check bot's latency\n`;
|
generalCommands += `**${supportbot.Prefix}${supportbot.PingCommand}** ${supportbot.PingDesc}\n`;
|
||||||
|
|
||||||
let supportCommands = "";
|
let supportCommands = "";
|
||||||
supportCommands += `**${supportbot.Prefix}${supportbot.NewTicket} [reason]** Create a support ticket\n`
|
supportCommands += `**${supportbot.Prefix}${supportbot.NewTicket} [reason]** ${supportbot.NewTicketDesc}\n`
|
||||||
supportCommands += `**${supportbot.Prefix}${supportbot.CloseTicket} [reason]** Close your support ticket\n`
|
supportCommands += `**${supportbot.Prefix}${supportbot.CloseTicket} [reason]** ${supportbot.CloseTicketDesc}\n`
|
||||||
|
|
||||||
let staffCommands = "";
|
let staffCommands = "";
|
||||||
staffCommands += `**${supportbot.Prefix}${supportbot.RenameTicket} <name>** Rename a valid support ticket\n`
|
staffCommands += `**${supportbot.Prefix}${supportbot.AddUser} <user#0000>** ${supportbot.AddUserDesc}\n`
|
||||||
staffCommands += `**${supportbot.Prefix}${supportbot.AddUser} <user#0000>** Add a user to a valid support ticket\n`
|
staffCommands += `**${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>** ${supportbot.RemoveUserDesc}\n`
|
||||||
staffCommands += `**${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>** Remove a user from a valid support ticket\n`
|
staffCommands += `**${supportbot.Prefix}${supportbot.BotSayCommand}** ${supportbot.BotSayDesc}\n`
|
||||||
|
staffCommands += `**${supportbot.Prefix}${supportbot.AnnounceCommand}** ${supportbot.AnnounceDesc}\n`
|
||||||
let adminCommands = "";
|
|
||||||
adminCommands += `**${supportbot.Prefix}${supportbot.AnnounceCommand}** Create a new server announcement\n`
|
|
||||||
adminCommands += `**${supportbot.Prefix}${supportbot.SayCommand}** Send a message as the bot\n`
|
|
||||||
|
|
||||||
const HelpCommandEmbed = new Discord.MessageEmbed()
|
const HelpCommandEmbed = new Discord.MessageEmbed()
|
||||||
.setTitle(supportbot.Bot_Name)
|
.setTitle(supportbot.Bot_Name)
|
||||||
@@ -37,13 +35,23 @@ module.exports = {
|
|||||||
.addFields(
|
.addFields(
|
||||||
{ name: '🖥️ General Commands', value: `${generalCommands}\n`, inline: false },
|
{ name: '🖥️ General Commands', value: `${generalCommands}\n`, inline: false },
|
||||||
{ name: '🎫 Support Commands', value: `${supportCommands}\n`, inline: false },
|
{ name: '🎫 Support Commands', value: `${supportCommands}\n`, inline: false },
|
||||||
{ name: '🔑 Staff Commands', value: `${staffCommands}\n`, inline: false },
|
|
||||||
{ name: '🔐 Admin Commands', value: `${adminCommands}`, inline: false },
|
|
||||||
)
|
)
|
||||||
|
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
|
.setFooter(supportbot.EmbedFooter, message.author.displayAvatarURL());
|
||||||
|
|
||||||
|
if (message.member.roles.cache.some(role => role.name === supportbot.Staff, supportbot.Admin)) {
|
||||||
|
HelpCommandEmbed.addFields(
|
||||||
|
{ name: '🔑 Staff Commands', value: `${staffCommands}\n`, inline: false },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (message.member.roles.cache.some(role => role.name === supportbot.Admin)) {
|
||||||
|
HelpCommandEmbed.addFields(
|
||||||
|
{ name: '🔑 Staff Commands', value: `${staffCommands}\n`, inline: false },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
message.channel.send({ embed: HelpCommandEmbed });
|
message.channel.send({ embed: HelpCommandEmbed });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -10,6 +10,7 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: supportbot.LinksCommand,
|
name: supportbot.LinksCommand,
|
||||||
|
description: supportbot.LinksDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ const reacted = [];
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: supportbot.NewTicket,
|
name: supportbot.NewTicket,
|
||||||
|
description: supportbot.NewTicketDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
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}!`);
|
||||||
@@ -24,7 +25,7 @@ module.exports = {
|
|||||||
// Ticket Exists
|
// Ticket Exists
|
||||||
const TicketExists = new Discord.MessageEmbed()
|
const TicketExists = new Discord.MessageEmbed()
|
||||||
.setTitle("Ticket Exists!")
|
.setTitle("Ticket Exists!")
|
||||||
.setDescription(":no_entry_sign: This ticket cannot be opened, It already exists!")
|
.setDescription(`${supportbot.TicketExists}`)
|
||||||
.setColor(supportbot.WarningColour)
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
if (message.guild.channels.cache.find(SupportTicket => SupportTicket.name === `${supportbot.TicketChannel}-${ticketNumberID}`))
|
if (message.guild.channels.cache.find(SupportTicket => SupportTicket.name === `${supportbot.TicketChannel}-${ticketNumberID}`))
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: supportbot.PingCommand,
|
name: supportbot.PingCommand,
|
||||||
|
description: supportbot.PingDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
let ping = Date.now() - message.createdTimestamp + " ms";
|
let ping = Date.now() - message.createdTimestamp + " ms";
|
||||||
|
|||||||
+13
-10
@@ -9,21 +9,24 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: supportbot.RemoveUser,
|
name: supportbot.RemoveUser,
|
||||||
|
description: supportbot.RemoveUserDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
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 staffGroup = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.Staff);
|
let SupportStaff = message.guild.roles.cache.find(staffRole => staffRole.name === supportbot.Staff);
|
||||||
const NoPerms = new Discord.MessageEmbed()
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
.setTitle("Invalid Permissions!")
|
.setTitle("Invalid Permissions!")
|
||||||
.setDescription(":warning: **Err!** You do not have the correct permissions to use this command.")
|
.setDescription(`${supportbot.IncorrectPerms}\n\nRole Required: \`${SupportStaff.name}\``)
|
||||||
.setColor(supportbot.WarningColour)
|
.setColor(supportbot.ErrorColour)
|
||||||
message.channel.send({ embed: NoPerms });
|
|
||||||
|
if (!message.member.roles.cache.has(SupportStaff.id))
|
||||||
|
return message.channel.send({ embed: NoPerms });
|
||||||
|
|
||||||
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
||||||
const Exists = new Discord.MessageEmbed()
|
const Exists = new Discord.MessageEmbed()
|
||||||
.setTitle("Incorrect Channel")
|
.setTitle("No Ticket Found!")
|
||||||
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
|
.setDescription(`${supportbot.NoValidTicket}`)
|
||||||
.setColor(supportbot.WarningColour);
|
.setColor(supportbot.WarningColour);
|
||||||
message.channel.send({ embed: Exists });
|
message.channel.send({ embed: Exists });
|
||||||
|
|
||||||
@@ -33,7 +36,7 @@ module.exports = {
|
|||||||
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
|
let rUser = message.guild.member(message.mentions.users.first() || message.guild.members.cache.get(args[0]));
|
||||||
const UserNotExist = new Discord.MessageEmbed()
|
const UserNotExist = new Discord.MessageEmbed()
|
||||||
.setTitle("User Not Found!")
|
.setTitle("User Not Found!")
|
||||||
.setDescription(`:x: **Error!** This user doesn't exist, Are they in this server?\n\nTry Again:\`${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>\``)
|
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>\``)
|
||||||
.setColor(supportbot.ErrorColor)
|
.setColor(supportbot.ErrorColor)
|
||||||
|
|
||||||
if (!rUser) return message.channel.send({ embed: UserNotExist });
|
if (!rUser) return message.channel.send({ embed: UserNotExist });
|
||||||
@@ -47,7 +50,7 @@ module.exports = {
|
|||||||
|
|
||||||
const Complete = new Discord.MessageEmbed()
|
const Complete = new Discord.MessageEmbed()
|
||||||
.setTitle("User Removed!")
|
.setTitle("User Removed!")
|
||||||
.setDescription(`👍 ${rUser} has been removed from this ticket`)
|
.setDescription(supportbot.RemovedUser.replace(/%user%/g, rUser.id))
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
message.channel.send({ embed: Complete });
|
message.channel.send({ embed: Complete });
|
||||||
|
|||||||
+3
-2
@@ -9,13 +9,14 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: supportbot.SuggestCommand,
|
name: supportbot.SuggestCommand,
|
||||||
|
description: supportbot.SuggestionDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
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()
|
||||||
.setTitle("SupportBot Error!")
|
.setTitle("Invalid Channel")
|
||||||
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.SuggestionChannel}\`\n\nError Code: \`SB-03\``)
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.SuggestionChannel}\``)
|
||||||
.setColor(supportbot.ErrorColour);
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
||||||
|
|||||||
Generated
+3
-3
@@ -126,9 +126,9 @@
|
|||||||
"integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw=="
|
"integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw=="
|
||||||
},
|
},
|
||||||
"ws": {
|
"ws": {
|
||||||
"version": "7.3.0",
|
"version": "7.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz",
|
||||||
"integrity": "sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w=="
|
"integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"ticket": "ticket-0058",
|
"ticket": "ticket-0061",
|
||||||
"id":419821884431925260
|
"id":419821884431925260
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"716992597377286145": {
|
"716992597377286145": {
|
||||||
"id": 59
|
"id": 62
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+26
-2
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
# General Bot Configuration
|
# General Bot Configuration
|
||||||
|
|
||||||
Token: "TOKEN"
|
Token: "NjcyMTU5MjQyNjg5NzA4MDUz.XwnBpg.6eCCVRv4m-aVPJuppHWNxpxpRs0"
|
||||||
Prefix: "!!"
|
Prefix: "!!"
|
||||||
Bot_Name: "SupportBot DEV"
|
Bot_Name: "SupportBot DEV"
|
||||||
|
|
||||||
@@ -56,6 +56,9 @@ NoTicketSubject: "No Reason Provided!"
|
|||||||
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
|
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
|
||||||
TranscriptTitle: "Ticket Transcript"
|
TranscriptTitle: "Ticket Transcript"
|
||||||
|
|
||||||
|
AddedUser: "👍 <@%user%> has been added to this ticket"
|
||||||
|
RemovedUser: "👍 <@%user%> has been removed from this ticket"
|
||||||
|
|
||||||
ClosingTicket: ":warning: You have requested to close your support ticket."
|
ClosingTicket: ":warning: You have requested to close your support ticket."
|
||||||
ClosingConfirmation_Word: "confirm"
|
ClosingConfirmation_Word: "confirm"
|
||||||
CloseConfirmation: "true"
|
CloseConfirmation: "true"
|
||||||
@@ -155,8 +158,29 @@ RenameTicket: "rename"
|
|||||||
|
|
||||||
# Staff Command Configuration
|
# Staff Command Configuration
|
||||||
|
|
||||||
SayCommand: "say"
|
BotSay: "say"
|
||||||
|
|
||||||
# Admin Command Configuration
|
# Admin Command Configuration
|
||||||
|
|
||||||
AnnounceCommand: "announce"
|
AnnounceCommand: "announce"
|
||||||
|
|
||||||
|
# Commmand Descriptions
|
||||||
|
|
||||||
|
NewTicketDesc: "Create a new support ticket"
|
||||||
|
AnnounceDesc: "Create a server announcement"
|
||||||
|
CloseTicketDesc: "Close your support ticket"
|
||||||
|
LinksDesc: "View some important links"
|
||||||
|
PingDesc: "Get the bot's latency"
|
||||||
|
HelpDesc: "Get a list of all the commands"
|
||||||
|
RemoveUserDesc: "Remove a user from a support ticket"
|
||||||
|
AddUserDesc: "Add a user to a support ticket"
|
||||||
|
SuggestionDesc: "Create a server suggestion"
|
||||||
|
BotSayDesc: "Say something with the bot"
|
||||||
|
|
||||||
|
# Error / Warining Messages
|
||||||
|
|
||||||
|
IncorrectPerms: ":x: **Err!** You do not have the correct permissions to use this command."
|
||||||
|
InvalidChannel: ":x: **Err!** Channel not found. Please create it!"
|
||||||
|
UserNotFound: ":x: **Err!** This user doesn't exist, Are they in this server?"
|
||||||
|
NoValidTicket: ":warning: You cannot execute this command here. This command is used when closing a ticket."
|
||||||
|
TicketExists: ":warning: This ticket cannot be opened, It already exists!"
|
||||||
Reference in new issue
Block a user