Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19a12f6c8f | ||
|
|
79a498d1d6 | ||
|
|
12a03c36f3 | ||
|
|
ddc8bcab9b | ||
|
|
35dacfd48a | ||
|
|
611cef34ab | ||
|
|
8a8f9fe890 | ||
|
|
5a65b70c80 | ||
|
|
8bea3faa1f | ||
|
|
4125954d53 | ||
|
|
3d9c5a729e | ||
|
|
51d775ea6d | ||
|
|
e461c47c4b | ||
|
|
bbdb38e45a | ||
|
|
083e047aec | ||
|
|
84e0b504ab | ||
|
|
bedff6832c | ||
|
|
6c29e04de2 | ||
|
|
ba674323e1 | ||
|
|
6d756a161e | ||
|
|
66a5cd95ec | ||
|
|
9f70648264 | ||
|
|
b975b79691 | ||
|
|
3cab896954 | ||
|
|
b9680e5b35 | ||
|
|
43a003ca7d | ||
|
|
fbe1cf2009 | ||
|
|
fdee61cc11 | ||
|
|
8b51200d9c | ||
|
|
0631ab536a | ||
|
|
0d76e76519 | ||
|
|
9e9f83d211 | ||
|
|
0829d477d9 | ||
|
|
1b7109fa23 | ||
|
|
366669ccd8 | ||
|
|
e05edd89fa | ||
|
|
a405df66c9 | ||
|
|
28a57ead9f | ||
|
|
72bfacae75 | ||
|
|
10f8821b3b | ||
|
|
92a3745ce1 | ||
|
|
aff7ff1451 | ||
|
|
9e63e0ff09 | ||
|
|
2c5ebd8620 | ||
|
|
e6d63db3a9 | ||
|
|
2cc316aafb | ||
|
|
4f25cfa0dd | ||
|
|
0385de3882 | ||
|
|
2e1253c54e | ||
|
|
14df15caeb | ||
|
|
af481a2ec8 | ||
|
|
96c1d80844 | ||
|
|
57ea2e25bd | ||
|
|
cd17b0a6d7 | ||
|
|
c5dd8823f6 | ||
|
|
c27f16f753 | ||
|
|
4842610229 | ||
|
|
bd33669dba | ||
|
|
e81684d322 | ||
|
|
8209dfa26c | ||
|
|
0a82c62a4e | ||
|
|
4399dfe6b8 | ||
|
|
defd0cc78c | ||
|
|
fd5fc8294c | ||
|
|
10823b416c | ||
|
|
4490920ac6 | ||
|
|
e0b8ad4a32 | ||
|
|
e11063832b | ||
|
|
d598fdd753 | ||
|
|
157b93239a | ||
|
|
3d7058dccd | ||
|
|
1ec654d1ea | ||
|
|
8ce2d4269d | ||
|
|
49e8aa7869 | ||
|
|
0827f55d43 | ||
|
|
ba6ff8c342 | ||
|
|
c0b7dc2737 | ||
|
|
ab6abd453b | ||
|
|
77921aca75 | ||
|
|
a8f91c4814 | ||
|
|
7780fa792c | ||
|
|
41e4c376ec | ||
|
|
09aad61cfe | ||
|
|
31ac81428f | ||
|
|
60daab82d2 | ||
|
|
e7a0544004 | ||
|
|
ff0364bba8 | ||
|
|
a3b64be351 | ||
|
|
eae370e346 | ||
|
|
0d86b50a83 | ||
|
|
543b9028a3 | ||
|
|
867f12d11f | ||
|
|
462781ea6a | ||
|
|
c300ab6459 | ||
|
|
448d8f3007 | ||
|
|
faa53b0af1 | ||
|
|
8e53b8d9a6 | ||
|
|
5678567baa | ||
|
|
1c30f73bb1 | ||
|
|
bd3dbc3033 | ||
|
|
3c312ab8d3 | ||
|
|
7284785db0 | ||
|
|
4e543ea490 | ||
|
|
4d3540126f | ||
|
|
6c29f0d792 | ||
|
|
c85df7c40f | ||
|
|
4f6ff575ce | ||
|
|
aaf3890f71 | ||
|
|
4f9837d991 | ||
|
|
2e2eb008c6 | ||
|
|
fa7074bb59 | ||
|
|
18a7def050 | ||
|
|
40e9cf5fe5 |
No files matched your search
@@ -0,0 +1,32 @@
|
|||||||
|
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||||
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||||
|
|
||||||
|
name: Node.js CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [10.x, 12.x, 14.x, 15.x]
|
||||||
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm install discord.js --save
|
||||||
|
- run: npm install js-yaml
|
||||||
|
- run: npm run build --if-present
|
||||||
|
- run: node index.js
|
||||||
@@ -1,10 +1,13 @@
|
|||||||
> #### SupportBot
|

|
||||||
>
|
|
||||||
> - SupportBot is a free to use discord ticket system that is highly customisable to your own brand,
|
## What is SupportBot?
|
||||||
Why use a branded ticket bot when you have the ability to match your ticket bot with your servers name.
|
|
||||||
>
|
SupportBot is an open-sourced support system for discord. It's completely free to use with high amounts of customisation to match your own brand.
|
||||||
> - Our Support team is over at [Discord](https://discord.com/invite/jspKFcE) ready to assist with any questions, concerns or setup information regarding SupportBot.
|
|
||||||
>
|
## Quick Links
|
||||||
> - [Download via Polymart](https://polymart.org/resource/supportbot-1-discord-ticket-bot.518)
|
|
||||||
> - [Download via MC-Market](https://www.mc-market.org/resources/8940/)
|
**|** [Discord](https://emeraldsrv.dev/discord) **|**
|
||||||
|
[Hosting](https://emeraldsrv.dev/hosting) **|**
|
||||||
|
[Documentation](https://docs.emeraldsrv.dev) **|**
|
||||||
|
[Download via Polymart](https://polymart.org/resource/supportbot-1-discord-ticket-bot.518) **|**
|
||||||
|
[Download via MC-Market](https://www.mc-market.org/resources/8940/) **|**
|
||||||
+8
-9
@@ -12,11 +12,10 @@ module.exports = {
|
|||||||
description: supportbot.AddUserDesc,
|
description: supportbot.AddUserDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
if (supportbot.DeleteMessages == "true") message.delete();
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.AddUser}!`);
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
|
||||||
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff)
|
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
|
||||||
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin)
|
|
||||||
|
|
||||||
const NoPerms = new Discord.MessageEmbed()
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
.setTitle("Invalid Permissions!")
|
.setTitle("Invalid Permissions!")
|
||||||
@@ -29,7 +28,7 @@ module.exports = {
|
|||||||
.setTitle("No Ticket Found!")
|
.setTitle("No Ticket Found!")
|
||||||
.setDescription(`${supportbot.NoValidTicket}`)
|
.setDescription(`${supportbot.NoValidTicket}`)
|
||||||
.setColor(supportbot.WarningColour);
|
.setColor(supportbot.WarningColour);
|
||||||
message.channel.send({ embed: Exists });
|
message.channel.send({ embeds: [Exists] });
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -40,7 +39,7 @@ module.exports = {
|
|||||||
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.AddUser} <user#0000>\``)
|
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.AddUser} <user#0000>\``)
|
||||||
.setColor(supportbot.ErrorColour)
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
if (!rUser) return message.channel.send({ embed: UserNotExist });
|
if (!rUser) return message.channel.send({ embeds: [UserNotExist] });
|
||||||
|
|
||||||
message.channel.updateOverwrite(rUser, {
|
message.channel.updateOverwrite(rUser, {
|
||||||
VIEW_CHANNEL: true,
|
VIEW_CHANNEL: true,
|
||||||
@@ -54,10 +53,10 @@ module.exports = {
|
|||||||
.setDescription(supportbot.AddedUser.replace(/%user%/g, rUser.id))
|
.setDescription(supportbot.AddedUser.replace(/%user%/g, rUser.id))
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
message.channel.send({ embed: Complete });
|
message.channel.send({ embeds: [Complete] });
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return message.channel.send({ embed: NoPerms });
|
return message.channel.send({ embeds: [NoPerms] });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,20 +14,18 @@ module.exports = {
|
|||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
|
|
||||||
if (supportbot.DeleteMessages == "true") message.delete();
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
|
||||||
let locateChannel = message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.name === supportbot.AnnouncementChannel);
|
let locateChannel = message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.name === supportbot.AnnouncementChannel) || message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.id === supportbot.AnnouncementChannel)
|
||||||
|
|
||||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.AnnounceCommand}!`);
|
|
||||||
|
|
||||||
const errornochannel = new Discord.MessageEmbed()
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
.setTitle("Invalid Channel")
|
.setTitle("Invalid Channel")
|
||||||
.setDescription(`${supportbot.InvalidChannel}\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({ embeds: [errornochannel] });
|
||||||
|
|
||||||
let Admins = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin);
|
let Admins = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
|
||||||
|
|
||||||
const NoPerms = new Discord.MessageEmbed()
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
.setTitle("Invalid Permissions!")
|
.setTitle("Invalid Permissions!")
|
||||||
@@ -35,13 +33,13 @@ module.exports = {
|
|||||||
.setColor(supportbot.WarningColour)
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
if (!message.member.roles.cache.has(Admins.id))
|
if (!message.member.roles.cache.has(Admins.id))
|
||||||
return message.channel.send({ embed: NoPerms });
|
return message.channel.send({ embeds: [NoPerms] });
|
||||||
|
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
const embed = new Discord.MessageEmbed()
|
||||||
.setDescription(`> **${supportbot.AnnouncementStarter}**`)
|
.setDescription(`> **${supportbot.AnnouncementStarter}**`)
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
message.channel.send({ embed: embed });
|
message.channel.send({ embeds: [embed] });
|
||||||
|
|
||||||
let announcement = []
|
let announcement = []
|
||||||
message.channel.awaitMessages(response => response.content.length > 2, {
|
message.channel.awaitMessages(response => response.content.length > 2, {
|
||||||
@@ -63,7 +61,7 @@ module.exports = {
|
|||||||
const AnnouncementComplete = new Discord.MessageEmbed()
|
const AnnouncementComplete = new Discord.MessageEmbed()
|
||||||
.setColor(supportbot.SuccessColour)
|
.setColor(supportbot.SuccessColour)
|
||||||
.setDescription(`:white_check_mark: You have successfully created an announcement. <#${locateChannel.id}>`)
|
.setDescription(`:white_check_mark: You have successfully created an announcement. <#${locateChannel.id}>`)
|
||||||
message.channel.send({ embed: AnnouncementComplete })
|
message.channel.send({ embeds: [AnnouncementComplete] })
|
||||||
})
|
})
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
+108
@@ -0,0 +1,108 @@
|
|||||||
|
// SupportBot, 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.BanUser,
|
||||||
|
description: supportbot.BanDesc,
|
||||||
|
|
||||||
|
execute(message, args, member) {
|
||||||
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
|
||||||
|
|
||||||
|
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({ embeds: [NoPerms] });
|
||||||
|
|
||||||
|
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
|
||||||
|
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Channel")
|
||||||
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
|
||||||
|
|
||||||
|
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
|
||||||
|
|
||||||
|
const embed1 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :x: Please provide a reason to ban.\n\n`Try Again!`")
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
if (!args[0]) return message.channel.send({
|
||||||
|
embeds: [embed1]
|
||||||
|
});
|
||||||
|
|
||||||
|
const embed2 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if (!user) return message.channel.send({
|
||||||
|
embeds: [embed2]
|
||||||
|
})
|
||||||
|
|
||||||
|
const embed3 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :x: **Err No!** Cannot punish this user!\n\n`Reason: Their permissions and or roles are greater than mine.`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if(!user.bannable) return message.channel.send({
|
||||||
|
embeds: [embed3]
|
||||||
|
});
|
||||||
|
|
||||||
|
const embed4 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :joy: **OML!** Did you really just try to ban yourself!")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if(user.id === message.author.id) return message.channel.send({
|
||||||
|
embeds: [embed4]
|
||||||
|
});
|
||||||
|
|
||||||
|
let reason = args.slice(1).join(" ");
|
||||||
|
|
||||||
|
if(!reason) reason = 'No Reason Provided.';
|
||||||
|
|
||||||
|
const embed5 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :thinking: **Hmm** Something seems to have gone wrong.\n\n`Check your system for errors!`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
user.ban({ days: supportbot.DaysBannedFor, reason: `${reason}` }).catch(err => {
|
||||||
|
message.channel.send({ embeds: [embed5] })
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const successEmbed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> :white_check_mark: **OOF!** ${user} has been banned!`)
|
||||||
|
.setColor(supportbot.SuccessColour)
|
||||||
|
message.channel.send({
|
||||||
|
embed: successEmbed
|
||||||
|
})
|
||||||
|
|
||||||
|
const logEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.BanTitle)
|
||||||
|
.setThumbnail(supportbot.ModThumbnail)
|
||||||
|
.addField('Banned User:', user)
|
||||||
|
.addField('Staff Member', message.author)
|
||||||
|
.addField('Reason:', reason)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
.setColor(supportbot.BanLogColour)
|
||||||
|
.setTimestamp()
|
||||||
|
|
||||||
|
locateChannel.send({ embeds: [logEmbed] })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Blacklist 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.BlacklistUser,
|
||||||
|
description: supportbot.BlacklistDesc,
|
||||||
|
|
||||||
|
execute(message, args) {
|
||||||
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
|
||||||
|
|
||||||
|
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({ embeds: [NoPerms] });
|
||||||
|
}
|
||||||
|
|
||||||
|
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
|
||||||
|
|
||||||
|
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
|
||||||
|
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Channel")
|
||||||
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
|
||||||
|
|
||||||
|
const embed1 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :x: Please mention or write an ID\n\n`Try Again!`")
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
if (!args[0]) return message.channel.send({
|
||||||
|
embeds: [embed1]
|
||||||
|
});
|
||||||
|
|
||||||
|
const embed2 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if (!user) return message.channel.send({
|
||||||
|
embeds: [embed2]
|
||||||
|
});
|
||||||
|
|
||||||
|
let role = message.guild.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || message.guild.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)
|
||||||
|
|
||||||
|
const embed3 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :detective: **Hmm!** Can\'t seem to find the blacklist role.\n\n`Did you created it?")
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
|
||||||
|
if (!role) return message.channel.send({
|
||||||
|
embeds: [embed3]
|
||||||
|
});
|
||||||
|
|
||||||
|
const embed4 = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`${user} is already blacklisted`)
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
if(user.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || user.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)) {
|
||||||
|
return message.channel.send({
|
||||||
|
embeds: [embed4]
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
user.roles.add(role);
|
||||||
|
|
||||||
|
const embed5 = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`Blacklisted ${user} successfully from creating a ticket`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
message.channel.send({
|
||||||
|
embeds: [embed5]
|
||||||
|
});
|
||||||
|
|
||||||
|
const logEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.BlacklistTitle)
|
||||||
|
.setThumbnail(supportbot.ModThumbnail)
|
||||||
|
.addField('Banned User:', user)
|
||||||
|
.addField('Staff Member', message.author)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
.setColor(supportbot.BlacklistColour)
|
||||||
|
.setTimestamp()
|
||||||
|
|
||||||
|
locateChannel.send({ embeds: [logEmbed] });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
Executable → Regular
+6
-8
@@ -13,11 +13,9 @@ module.exports = {
|
|||||||
description: supportbot.BotSayDesc,
|
description: supportbot.BotSayDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
if (supportbot.DeleteMessages == "true") message.delete();
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
|
||||||
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff);
|
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Staff)
|
||||||
|
|
||||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.BotSay}!`);
|
|
||||||
|
|
||||||
const NoPerms = new Discord.MessageEmbed()
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
.setTitle("Invalid Permissions!")
|
.setTitle("Invalid Permissions!")
|
||||||
@@ -25,13 +23,13 @@ module.exports = {
|
|||||||
.setColor(supportbot.WarningColour)
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
if (!message.member.roles.cache.has(SupportStaff.id))
|
if (!message.member.roles.cache.has(SupportStaff.id))
|
||||||
return message.channel.send({ embed: NoPerms });
|
return message.channel.send({ embeds: [NoPerms] });
|
||||||
|
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
const embed = new Discord.MessageEmbed()
|
||||||
.setDescription(`> **What would you like me to say!**`)
|
.setDescription(`> **What would you like me to say!**`)
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
message.channel.send({ embed: embed });
|
message.channel.send({ embeds: [embed] });
|
||||||
|
|
||||||
let announcement = []
|
let announcement = []
|
||||||
message.channel.awaitMessages(response => response.content.length > 2, {
|
message.channel.awaitMessages(response => response.content.length > 2, {
|
||||||
@@ -45,9 +43,9 @@ module.exports = {
|
|||||||
.setDescription(announcement)
|
.setDescription(announcement)
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
message.channel.send({ embed: AnnouncementEmbed })
|
message.channel.send({ embeds: [AnnouncementEmbed] })
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
+44
-30
@@ -13,10 +13,8 @@ module.exports = {
|
|||||||
description: supportbot.CloseTicketDesc,
|
description: supportbot.CloseTicketDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
if (supportbot.DeleteMessages == "true") message.delete();
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
|
||||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.CloseTicket}!`);
|
|
||||||
|
|
||||||
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) {
|
||||||
const Exists = new Discord.MessageEmbed()
|
const Exists = new Discord.MessageEmbed()
|
||||||
.setTitle("No Ticket Found!")
|
.setTitle("No Ticket Found!")
|
||||||
@@ -28,7 +26,7 @@ module.exports = {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (supportbot.CloseConfirmation === "true") {
|
if (supportbot.CloseConfirmation) {
|
||||||
const CloseTicketRequest = new Discord.MessageEmbed()
|
const CloseTicketRequest = new Discord.MessageEmbed()
|
||||||
.setTitle(`**${supportbot.ClosingTicket}**`)
|
.setTitle(`**${supportbot.ClosingTicket}**`)
|
||||||
.setDescription(`Please confirm by repeating the following word.. \`${supportbot.ClosingConfirmation_Word}\` `)
|
.setDescription(`Please confirm by repeating the following word.. \`${supportbot.ClosingConfirmation_Word}\` `)
|
||||||
@@ -42,7 +40,7 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
}).then( collected => {
|
}).then( collected => {
|
||||||
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog);
|
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog) || message.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog)
|
||||||
let user = message.author;
|
let user = message.author;
|
||||||
let reason = args.join(" ") || "No Reason Provided.";
|
let reason = args.join(" ") || "No Reason Provided.";
|
||||||
|
|
||||||
@@ -60,28 +58,37 @@ module.exports = {
|
|||||||
.addField("Reason", reason);
|
.addField("Reason", reason);
|
||||||
|
|
||||||
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
|
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
|
||||||
let txt = '';
|
let html = '';
|
||||||
|
|
||||||
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
||||||
txt += `${message.guild.name}\n`;
|
html += `<strong>Server Name:</strong> ${message.guild.name}<br>`;
|
||||||
txt += `#${ticketChannel.name}\n`;
|
html += `<strong>Ticket:</strong> ${ticketChannel.name}<br>`;
|
||||||
txt += `${msgs.size} messages\n\n\n`;
|
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`;
|
||||||
|
|
||||||
msgs.forEach( msg => {
|
msgs.forEach( msg => {
|
||||||
if ( msg.content ) {
|
if ( msg.content ) {
|
||||||
txt += `----- ${msg.author.tag} at ${msg.createdAt}\n`;
|
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
|
||||||
txt += `${msg.content}\n`;
|
html += `<strong>Message:</strong> ${msg.content}<br>`;
|
||||||
txt += `-----\n\n`;
|
html += `-----<br><br>`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
logChannel.send(logEmbed).catch(err => {
|
logChannel.send({embeds: [logEmbed]}).catch(err => {
|
||||||
message.reply(err)
|
message.reply(err)
|
||||||
})
|
})
|
||||||
|
|
||||||
logChannel.send( new Discord.MessageAttachment( Buffer.from( txt ), `${name}.txt` ) );
|
|
||||||
|
|
||||||
message.channel.delete();
|
let file = new Discord.MessageAttachment( Buffer.from( html ), `${name}.html` )
|
||||||
|
logChannel.send({embeds: [logEmbed], files: [file]}).catch(err => {
|
||||||
|
message.reply(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
message.channel.delete().catch(error => {
|
||||||
|
if (error.code !== Discord.Constants.APIErrors.UNKNOWN_CHANNEL) {
|
||||||
|
console.error('Failed to delete the message:', error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -89,14 +96,14 @@ module.exports = {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}).catch( () => {
|
}).catch( () => {
|
||||||
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
|
interaction.m.edit({content: 'The request to close the ticket has timed out.'}).then(m2 => setTimeout(() => channel.delete(3000)) );
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (supportbot.CloseConfirmation === "false") {
|
if (!supportbot.CloseConfirmation) {
|
||||||
|
|
||||||
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog);
|
let logChannel = message.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog) || message.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog)
|
||||||
let user = message.author;
|
let user = message.author;
|
||||||
let reason = args.join(" ") || "No Reason Provided.";
|
let reason = args.join(" ") || "No Reason Provided.";
|
||||||
|
|
||||||
@@ -114,36 +121,43 @@ module.exports = {
|
|||||||
.addField("Reason", reason);
|
.addField("Reason", reason);
|
||||||
|
|
||||||
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
|
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
|
||||||
let txt = '';
|
let html = '';
|
||||||
|
|
||||||
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
||||||
txt += `${message.guild.name}\n`;
|
html += `<strong>Server Name:</strong> ${message.guild.name}<br>`;
|
||||||
txt += `#${ticketChannel.name}\n`;
|
html += `<strong>Ticket:</strong> ${ticketChannel.name}<br>`;
|
||||||
txt += `${msgs.size} messages\n\n\n`;
|
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`;
|
||||||
|
|
||||||
msgs.forEach( msg => {
|
msgs.forEach( msg => {
|
||||||
if ( msg.content ) {
|
if ( msg.content ) {
|
||||||
txt += `----- ${msg.author.tag} at ${msg.createdAt}\n`;
|
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
|
||||||
txt += `${msg.content}\n`;
|
html += `<strong>Message:</strong> ${msg.content}<br>`;
|
||||||
txt += `-----\n\n`;
|
html += `-----<br><br>`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
logChannel.send(logEmbed).catch(err => {
|
logChannel.send({embeds: [logEmbed]}).catch(err => {
|
||||||
message.reply(err)
|
message.reply(err)
|
||||||
})
|
})
|
||||||
|
|
||||||
logChannel.send( new Discord.MessageAttachment( Buffer.from( txt ), `${name}.txt` ) );
|
let file = new Discord.MessageAttachment( Buffer.from( html ), `${name}.html` )
|
||||||
|
logChannel.send({embeds: [logEmbed], files: [file]}).catch(err => {
|
||||||
|
message.reply(err)
|
||||||
|
})
|
||||||
|
|
||||||
message.channel.delete();
|
message.channel.delete().catch(error => {
|
||||||
|
if (error.code !== Discord.Constants.APIErrors.UNKNOWN_CHANNEL) {
|
||||||
|
console.error('Failed to delete the message:', error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}).catch( () => {
|
}).catch( () => {
|
||||||
m.edit('The request to close the ticket has timed out.').then( m2 => m2.delete( 3000 ) );
|
interaction.m.edit({content: 'The request to close the ticket has timed out.'}).then(m2 => setTimeout(() => channel.delete(3000)) );
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
+42
-12
@@ -11,14 +11,17 @@ module.exports = {
|
|||||||
name: supportbot.HelpCommand,
|
name: supportbot.HelpCommand,
|
||||||
description: supportbot.HelpDesc,
|
description: supportbot.HelpDesc,
|
||||||
|
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
if (supportbot.DeleteMessages == "true") message.delete();
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
|
||||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.HelpCommand}!`);
|
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(staffRole => staffRole.id === supportbot.Staff);
|
||||||
|
let AdminStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin);
|
||||||
|
|
||||||
|
if (supportbot.HelpMenu) {
|
||||||
let generalCommands = "";
|
let generalCommands = "";
|
||||||
generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** ${supportbot.HelpDesc}\n`;
|
generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** ${supportbot.HelpDesc}\n`;
|
||||||
generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** ${supportbot.LinkDesc}\n`;
|
generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** ${supportbot.LinksDesc}\n`;
|
||||||
generalCommands += `**${supportbot.Prefix}${supportbot.SuggestCommand}** ${supportbot.SuggestionDesc}\n`;
|
generalCommands += `**${supportbot.Prefix}${supportbot.SuggestCommand}** ${supportbot.SuggestionDesc}\n`;
|
||||||
generalCommands += `**${supportbot.Prefix}${supportbot.PingCommand}** ${supportbot.PingDesc}\n`;
|
generalCommands += `**${supportbot.Prefix}${supportbot.PingCommand}** ${supportbot.PingDesc}\n`;
|
||||||
|
|
||||||
@@ -30,26 +33,53 @@ module.exports = {
|
|||||||
staffCommands += `**${supportbot.Prefix}${supportbot.AddUser} <user#0000>** ${supportbot.AddUserDesc}\n`
|
staffCommands += `**${supportbot.Prefix}${supportbot.AddUser} <user#0000>** ${supportbot.AddUserDesc}\n`
|
||||||
staffCommands += `**${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>** ${supportbot.RemoveUserDesc}\n`
|
staffCommands += `**${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>** ${supportbot.RemoveUserDesc}\n`
|
||||||
staffCommands += `**${supportbot.Prefix}${supportbot.BotSay}** ${supportbot.BotSayDesc}\n`
|
staffCommands += `**${supportbot.Prefix}${supportbot.BotSay}** ${supportbot.BotSayDesc}\n`
|
||||||
staffCommands += `**${supportbot.Prefix}${supportbot.AnnounceCommand}** ${supportbot.AnnounceDesc}\n`
|
staffCommands += `**${supportbot.Prefix}${supportbot.PurgeMessage}** ${supportbot.PurgeDesc}\n`
|
||||||
|
staffCommands += `**${supportbot.Prefix}${supportbot.ChatLog}** ${supportbot.ChatLogDesc}\n`
|
||||||
|
|
||||||
|
let adminCommands = "";
|
||||||
|
adminCommands += `**${supportbot.Prefix}${supportbot.AnnounceCommand}** ${supportbot.AnnounceDesc} \`Admin Only\`\n`
|
||||||
|
adminCommands += `**${supportbot.Prefix}${supportbot.BanUser}** ${supportbot.BanDesc} \`Admin Only\` \n`
|
||||||
|
adminCommands += `**${supportbot.Prefix}${supportbot.KickUser}** ${supportbot.KickDesc} \`Admin Only\` \n`
|
||||||
|
adminCommands += `**${supportbot.Prefix}${supportbot.BlacklistUser}** ${supportbot.BlacklistDesc} \`Admin Only\` \n`
|
||||||
|
|
||||||
const HelpCommandEmbed = new Discord.MessageEmbed()
|
const HelpEmbed1 = new Discord.MessageEmbed()
|
||||||
.setTitle(supportbot.Bot_Name)
|
.setTitle(supportbot.Bot_Name)
|
||||||
.setThumbnail(message.author.displayAvatarURL())
|
.setThumbnail(message.author.displayAvatarURL())
|
||||||
|
|
||||||
.addFields(
|
.addFields(
|
||||||
{ name: '🖥️ General Commands', value: `${generalCommands}\n`, inline: false },
|
{ name: '🖥️ General Commands\n', value: `${generalCommands}\n`, inline: false },
|
||||||
{ name: '🎫 Support Commands', value: `${supportCommands}\n`, inline: false },
|
{ name: '🎫 Support Commands\n', value: `${supportCommands}\n`, 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)) {
|
if (message.member.roles.cache.has(SupportStaff.id)) {
|
||||||
HelpCommandEmbed.addFields(
|
HelpEmbed1.addFields(
|
||||||
{ name: '🔐 Staff Commands', value: `${staffCommands}\n`, inline: false },
|
{ name: '🔐 Staff Commands\n', value: `${staffCommands}\n`, inline: false },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (message.member.roles.cache.has(AdminStaff.id)) {
|
||||||
|
HelpEmbed1.addFields(
|
||||||
|
{ name: '🔐 Admin Commands\n', value: `${adminCommands}\n`, inline: false },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
message.channel.send({ embed: HelpCommandEmbed });
|
if (supportbot.SendHelpPage === "dm") {
|
||||||
|
message.author.send({
|
||||||
|
embeds: [HelpEmbed1]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.SendHelpPage === "channel") {
|
||||||
|
message.channel.send({
|
||||||
|
embeds: [HelpEmbed1]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
// SupportBot, 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.KickUser,
|
||||||
|
description: supportbot.KickDesc,
|
||||||
|
|
||||||
|
execute(message, args, member) {
|
||||||
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Admin) || message.guild.roles.cache.find(adminRole => adminRole.id === supportbot.Admin)
|
||||||
|
|
||||||
|
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({ embeds: [NoPerms] });
|
||||||
|
|
||||||
|
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
|
||||||
|
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Channel")
|
||||||
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
|
||||||
|
|
||||||
|
const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
|
||||||
|
|
||||||
|
const embed1 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :x: Please provide a reason to kick.\n\n`Try Again!`")
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
if (!args[0]) return message.channel.send({
|
||||||
|
embeds: [embed1]
|
||||||
|
});
|
||||||
|
|
||||||
|
const embed2 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :detective: **Hmm!** Can\'t seem tp find this user.\n\n`Are they in the server?`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if (!user) return message.channel.send({
|
||||||
|
embeds: [embed2]
|
||||||
|
})
|
||||||
|
|
||||||
|
const embed3 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :x: **Err No!** Cannot punish this user!\n\n`Reason: Their permissions and or roles are greater than mine.`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if(!user.kickable) return message.channel.send({
|
||||||
|
embeds: [embed3]
|
||||||
|
});
|
||||||
|
|
||||||
|
const embed4 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :joy: **OML!** Did you really just try to kick yourself!")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if(user.id === message.author.id) return message.channel.send({
|
||||||
|
embeds: [embed4]
|
||||||
|
});
|
||||||
|
|
||||||
|
let reason = args.slice(1).join(" ");
|
||||||
|
|
||||||
|
if(!reason) reason = 'No Reason Provided.';
|
||||||
|
|
||||||
|
const embed5 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :thinking: **Hmm** Something seems to have gone wrong.\n\n`Check your system for errors!`")
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
user.kick({ reason: `${reason}` }).catch(err => {
|
||||||
|
message.channel.send({ embeds: [embed5] })
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const successEmbed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> :white_check_mark: **OOF!** ${user} has been kicked!`)
|
||||||
|
.setColor(supportbot.SuccessColour)
|
||||||
|
|
||||||
|
message.channel.send({
|
||||||
|
embeds: [successEmbed]
|
||||||
|
})
|
||||||
|
|
||||||
|
const logEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.KickTitle)
|
||||||
|
.setThumbnail(supportbot.ModThumbnail)
|
||||||
|
.addField('Kicked User:', user)
|
||||||
|
.addField('Staff Member', message.author)
|
||||||
|
.addField('Reason:', reason)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
.setColor(supportbot.KickLogColour)
|
||||||
|
.setTimestamp()
|
||||||
|
|
||||||
|
locateChannel.send({ embeds: [logEmbed] })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
+2
-4
@@ -13,10 +13,8 @@ module.exports = {
|
|||||||
description: supportbot.LinksDesc,
|
description: supportbot.LinksDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
if (supportbot.DeleteMessages == "true") message.delete();
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
|
||||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.LinksCommand}!`);
|
|
||||||
|
|
||||||
const LinksEmbed = new Discord.MessageEmbed()
|
const LinksEmbed = new Discord.MessageEmbed()
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
@@ -30,7 +28,7 @@ module.exports = {
|
|||||||
|
|
||||||
LinksEmbed.addField(supportbot.LinksTitle, links)
|
LinksEmbed.addField(supportbot.LinksTitle, links)
|
||||||
|
|
||||||
message.channel.send({ embed: LinksEmbed });
|
message.channel.send({ embeds: [LinksEmbed] });
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -1,272 +0,0 @@
|
|||||||
// SupportBot, Created by Emerald Services
|
|
||||||
// Ticket Command
|
|
||||||
|
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const bot = new Discord.Client()
|
|
||||||
|
|
||||||
const fs = require("fs")
|
|
||||||
const yaml = require('js-yaml');
|
|
||||||
|
|
||||||
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
|
||||||
const TicketNumberID = require('../utils/TicketNumber.js');
|
|
||||||
|
|
||||||
const reacted = [];
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
name: supportbot.NewTicket,
|
|
||||||
description: supportbot.NewTicketDesc,
|
|
||||||
|
|
||||||
execute(message, args) {
|
|
||||||
if (!message.channel.name === supportbot.ReactionChannel) {
|
|
||||||
if (supportbot.DeleteMessages == "true") message.delete();
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.NewTicket}!`);
|
|
||||||
|
|
||||||
// Ticket ID
|
|
||||||
let ticketNumberID = TicketNumberID.pad(message.guild.id);
|
|
||||||
|
|
||||||
// Ticket Subject
|
|
||||||
const TicketSubject = args || supportbot.NoTicketSubject;
|
|
||||||
|
|
||||||
// Ticket Exists
|
|
||||||
const TicketExists = new Discord.MessageEmbed()
|
|
||||||
.setTitle("Ticket Exists!")
|
|
||||||
.setDescription(`${supportbot.TicketExists}`)
|
|
||||||
.setColor(supportbot.WarningColour)
|
|
||||||
|
|
||||||
if (message.guild.channels.cache.find(SupportTicket => SupportTicket.name === `${supportbot.TicketChannel}-${ticketNumberID}`))
|
|
||||||
return message.channel.send({ embed: TicketExists });
|
|
||||||
|
|
||||||
message.guild.channels.create(`${supportbot.TicketChannel}-${ticketNumberID}`, {
|
|
||||||
type: "text",
|
|
||||||
}).then(SupportTicket => {
|
|
||||||
|
|
||||||
let AllUsers = message.guild.roles.cache.find(everyone => everyone.name === '@everyone')
|
|
||||||
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff)
|
|
||||||
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin)
|
|
||||||
|
|
||||||
let DeptRole1 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_1}`)
|
|
||||||
let DeptRole2 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_2}`)
|
|
||||||
let DeptRole3 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_3}`)
|
|
||||||
|
|
||||||
SupportTicket.updateOverwrite(AllUsers, {
|
|
||||||
VIEW_CHANNEL: false,
|
|
||||||
READ_MESSAGES: false,
|
|
||||||
SEND_MESSAGES: false,
|
|
||||||
})
|
|
||||||
|
|
||||||
SupportTicket.updateOverwrite(message.author, {
|
|
||||||
VIEW_CHANNEL: true,
|
|
||||||
READ_MESSAGES: true,
|
|
||||||
SEND_MESSAGES: true,
|
|
||||||
})
|
|
||||||
|
|
||||||
SupportTicket.updateOverwrite(SupportStaff, {
|
|
||||||
VIEW_CHANNEL: true,
|
|
||||||
READ_MESSAGES: true,
|
|
||||||
SEND_MESSAGES: true,
|
|
||||||
})
|
|
||||||
|
|
||||||
SupportTicket.updateOverwrite(Admins, {
|
|
||||||
VIEW_CHANNEL: true,
|
|
||||||
READ_MESSAGES: true,
|
|
||||||
SEND_MESSAGES: true,
|
|
||||||
})
|
|
||||||
|
|
||||||
// Ticket Category
|
|
||||||
let TicketCategory = message.guild.channels.cache.find(category => category.name === supportbot.TicketCategory)
|
|
||||||
|
|
||||||
if (TicketCategory) {
|
|
||||||
SupportTicket.setParent(TicketCategory.id)
|
|
||||||
} else {
|
|
||||||
if (message.guild.channels.cache.get(supportbot.TicketCategory)) {
|
|
||||||
SupportTicket.setParent(message.guild.channels.cache.get(supportbot.TicketCategory).id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ticket Created, Message Sent
|
|
||||||
|
|
||||||
if (supportbot.AllowTicketMentions === "true") {
|
|
||||||
SupportTicket.send(`<@${message.author.id}>`)
|
|
||||||
}
|
|
||||||
|
|
||||||
const TicketMessage = new Discord.MessageEmbed()
|
|
||||||
.setTitle(supportbot.Ticket_Title.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username))
|
|
||||||
.setDescription(supportbot.TicketMessage.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username))
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
|
|
||||||
if (supportbot.TicketSubject === "embed") {
|
|
||||||
|
|
||||||
if (TicketSubject != 'No Reason Provided.') {
|
|
||||||
TicketMessage.addFields({ name: 'Reason', value: TicketSubject })
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (supportbot.TicketSubject === "description") {
|
|
||||||
|
|
||||||
if (TicketSubject != 'No Reason Provided.') {
|
|
||||||
SupportTicket.setTopic(`Reason: ${TicketSubject} - User ID: ${message.author.id} - Ticket: ${SupportTicket.name}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (supportbot.TicketDepartments === "true") {
|
|
||||||
TicketMessage.addFields({ name: 'Departments', value: `${supportbot.DepartmentEmoji_1} **${supportbot.DepartmentTitle_1}**\n${supportbot.DepartmentEmoji_2} **${supportbot.DepartmentTitle_2}**\n${supportbot.DepartmentEmoji_3} **${supportbot.DepartmentTitle_3}**` })
|
|
||||||
}
|
|
||||||
|
|
||||||
SupportTicket.send({ embed: TicketMessage }).then( async function(msg) {
|
|
||||||
|
|
||||||
const Emoji_1 = supportbot.DepartmentEmoji_1;
|
|
||||||
const Emoji_2 = supportbot.DepartmentEmoji_2;
|
|
||||||
const Emoji_3 = supportbot.DepartmentEmoji_3;
|
|
||||||
|
|
||||||
reacted[ticketNumberID] = false;
|
|
||||||
|
|
||||||
if (supportbot.TicketDepartments === "true") {
|
|
||||||
await msg.react(Emoji_1);
|
|
||||||
await msg.react(Emoji_2);
|
|
||||||
await msg.react(Emoji_3);
|
|
||||||
let filter = (reaction, user) => {
|
|
||||||
if (user.id !== message.author.id) return;
|
|
||||||
if (typeof reacted[ticketNumberID] !== "boolean") return;
|
|
||||||
delete reacted[ticketNumberID];
|
|
||||||
if (reaction.emoji.name === Emoji_1) {
|
|
||||||
SupportTicket.updateOverwrite(message.author.id, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
SupportTicket.updateOverwrite(Admins, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
SupportTicket.updateOverwrite(DeptRole1, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
|
|
||||||
if (supportbot.AllowStaff === "true") {
|
|
||||||
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
}
|
|
||||||
|
|
||||||
if (supportbot.AllowStaff === "false") {
|
|
||||||
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: false, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
}
|
|
||||||
|
|
||||||
const Department1 = new Discord.MessageEmbed()
|
|
||||||
.setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_1} Department**. Please provide us information regarding your query.`)
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
SupportTicket.send({ embed: Department1 });
|
|
||||||
|
|
||||||
if (supportbot.AllowTicketMentions === "true") {
|
|
||||||
SupportTicket.send(`@here`)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (reaction.emoji.name === Emoji_2) {
|
|
||||||
SupportTicket.updateOverwrite(message.author.id, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
SupportTicket.updateOverwrite(Admins, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
SupportTicket.updateOverwrite(DeptRole2, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
|
|
||||||
if (supportbot.AllowStaff === "true") {
|
|
||||||
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
}
|
|
||||||
|
|
||||||
if (supportbot.AllowStaff === "false") {
|
|
||||||
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: false, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
}
|
|
||||||
|
|
||||||
const Department2 = new Discord.MessageEmbed()
|
|
||||||
.setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_2} Department**. Please provide us information regarding your query.`)
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
SupportTicket.send({ embed: Department2 });
|
|
||||||
|
|
||||||
if (supportbot.AllowTicketMentions === "true") {
|
|
||||||
SupportTicket.send(`@here`)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (reaction.emoji.name === `${Emoji_3}`) {
|
|
||||||
SupportTicket.updateOverwrite(message.author.id, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
SupportTicket.updateOverwrite(Admins, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
SupportTicket.updateOverwrite(DeptRole3, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: false, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
|
|
||||||
if (supportbot.AllowStaff === "true") {
|
|
||||||
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: true, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
}
|
|
||||||
|
|
||||||
if (supportbot.AllowStaff === "false") {
|
|
||||||
SupportTicket.updateOverwrite(SupportStaff, { VIEW_CHANNEL: false, READ_MESSAGES: true, SEND_MESSAGES: true, })
|
|
||||||
}
|
|
||||||
|
|
||||||
const Department3 = new Discord.MessageEmbed()
|
|
||||||
.setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_3} Department**. Please provide us information regarding your query.`)
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
SupportTicket.send({ embed: Department3 });
|
|
||||||
|
|
||||||
if (supportbot.AllowTicketMentions === "true") {
|
|
||||||
SupportTicket.send(`@here`)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return [Emoji_1, Emoji_2, Emoji_3].includes(reaction.emoji.name) && user.id !== message.author.id;
|
|
||||||
}
|
|
||||||
msg.awaitReactions(filter, {
|
|
||||||
max: 4,
|
|
||||||
time: 60000,
|
|
||||||
errors: ['time']
|
|
||||||
}).then(async collected => {
|
|
||||||
});
|
|
||||||
|
|
||||||
setTimeout(async function() {
|
|
||||||
if (typeof reacted[ticketNumberID] == "boolean") {
|
|
||||||
delete reacted[ticketNumberID];
|
|
||||||
//delete channel because didn't react in a minute
|
|
||||||
}
|
|
||||||
}, 60000);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
if (message.channel.name === supportbot.ReactionChannel) {
|
|
||||||
const CreatedTicket = new Discord.MessageEmbed()
|
|
||||||
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username))
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
message.channel.send({embed: CreatedTicket}).then((r) => {
|
|
||||||
r.delete({ timeout:5000 })
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
const CreatedTicket = new Discord.MessageEmbed()
|
|
||||||
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username))
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
message.channel.send({embed: CreatedTicket});
|
|
||||||
}
|
|
||||||
fs.writeFileSync("./storage/SupportTickets.json", '{\n "ticket": "' + SupportTicket.name + '", \n "id":' + message.author.id + "\n}", (err) => {
|
|
||||||
if (!err) return;
|
|
||||||
console.error(err)
|
|
||||||
})
|
|
||||||
|
|
||||||
// Ticket Logs
|
|
||||||
|
|
||||||
const errornochannel = new Discord.MessageEmbed()
|
|
||||||
.setTitle("SupportBot Error!")
|
|
||||||
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.TicketLog}\`\n\nError Code: \`SB-03\``)
|
|
||||||
.setColor(supportbot.ErrorColour);
|
|
||||||
|
|
||||||
const TicketLogs = new Discord.MessageEmbed()
|
|
||||||
.setTitle("Ticket Log")
|
|
||||||
.setThumbnail(supportbot.Ticket_Thumbnail)
|
|
||||||
.addFields(
|
|
||||||
{ name: 'Ticket', value: `<#${SupportTicket.id}>` },
|
|
||||||
{ name: 'User', value: `<@${message.author.id}>` },
|
|
||||||
)
|
|
||||||
.setColor(supportbot.EmbedColour)
|
|
||||||
.setFooter(supportbot.EmbedFooter)
|
|
||||||
|
|
||||||
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === supportbot.TicketLog)
|
|
||||||
|
|
||||||
if(!locateChannel) return message.channel.send({ embed: errornochannel });
|
|
||||||
|
|
||||||
locateChannel.send({ embed: TicketLogs });
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
+2
-4
@@ -12,16 +12,14 @@ module.exports = {
|
|||||||
description: supportbot.PingDesc,
|
description: supportbot.PingDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
if (supportbot.DeleteMessages == "true") message.delete();
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
|
||||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.PingCommand}!`)
|
|
||||||
|
|
||||||
let ping = Date.now() - message.createdTimestamp + " ms";
|
let ping = Date.now() - message.createdTimestamp + " ms";
|
||||||
|
|
||||||
const PingCommandEmbed = new Discord.MessageEmbed()
|
const PingCommandEmbed = new Discord.MessageEmbed()
|
||||||
.setDescription(`🏓 **Pong!** \`${Date.now() - message.createdTimestamp}ms\``)
|
.setDescription(`🏓 **Pong!** \`${Date.now() - message.createdTimestamp}ms\``)
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
message.channel.send({ embed: PingCommandEmbed });
|
message.channel.send({ embeds: [PingCommandEmbed] });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
// SupportBot, 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.PurgeMessage,
|
||||||
|
description: supportbot.PurgeDesc,
|
||||||
|
|
||||||
|
execute(message, args, member) {
|
||||||
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
|
||||||
|
let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff) || message.guild.roles.cache.find(adminRole => adminRole.id === 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({ embeds: [NoPerms] });
|
||||||
|
|
||||||
|
let locateChannel = message.guild.channels.cache.find(ModLogChannel => ModLogChannel.name === supportbot.ModLogChannel) || message.guild.channels.cache.find(ModLogChannel => ModLogChannel.id === supportbot.ModLogChannel)
|
||||||
|
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Invalid Channel")
|
||||||
|
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.ModLogChannel}\``)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
|
||||||
|
|
||||||
|
const embed1 = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> :thinking: **Hmm!** Please enter a valid number of message to purge!\n\n\`${supportbot.Prefix}${supportbot.PurgeMessage} <message count>\` `)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (!args[0]) return message.channel.send({
|
||||||
|
embeds: [embed1]
|
||||||
|
});
|
||||||
|
|
||||||
|
const messagePrune = parseInt(args[0])
|
||||||
|
|
||||||
|
const embed2 = new Discord.MessageEmbed()
|
||||||
|
.setDescription("> :person_facepalming: **Grr!** Can you count? That ain't a number :joy:")
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
|
if (isNaN(messagePrune)) return message.reply({
|
||||||
|
embeds: [embed2]
|
||||||
|
})
|
||||||
|
|
||||||
|
message.channel.bulkDelete(messagePrune).then(() => {
|
||||||
|
|
||||||
|
const embed3 = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> :recycle: \`${args[0]} messages\` **have been purged!** `)
|
||||||
|
.setColor(supportbot.ErrorColour)
|
||||||
|
message.channel.send({
|
||||||
|
embeds: [embed3]
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const logEmbed = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.PruneLogTitle)
|
||||||
|
.setThumbnail(supportbot.PruneThumbnail)
|
||||||
|
.addField('Messages Purged', `\`${args[0]} messages\``)
|
||||||
|
.addField('Staff Member', message.author)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
.setColor(supportbot.PruneColour)
|
||||||
|
.setTimestamp()
|
||||||
|
|
||||||
|
locateChannel.send({ embeds: [logEmbed] })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
@@ -12,12 +12,10 @@ module.exports = {
|
|||||||
description: supportbot.RemoveUserDesc,
|
description: supportbot.RemoveUserDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
if (supportbot.DeleteMessages == "true") message.delete();
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
|
||||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.RemoveUser}!`);
|
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
|
||||||
|
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
|
||||||
let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff)
|
|
||||||
let Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin)
|
|
||||||
|
|
||||||
const NoPerms = new Discord.MessageEmbed()
|
const NoPerms = new Discord.MessageEmbed()
|
||||||
.setTitle("Invalid Permissions!")
|
.setTitle("Invalid Permissions!")
|
||||||
@@ -30,7 +28,7 @@ module.exports = {
|
|||||||
.setTitle("No Ticket Found!")
|
.setTitle("No Ticket Found!")
|
||||||
.setDescription(`${supportbot.NoValidTicket}`)
|
.setDescription(`${supportbot.NoValidTicket}`)
|
||||||
.setColor(supportbot.WarningColour);
|
.setColor(supportbot.WarningColour);
|
||||||
message.channel.send({ embed: Exists });
|
message.channel.send({ embeds: [Exists] });
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -41,7 +39,7 @@ module.exports = {
|
|||||||
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>\``)
|
.setDescription(`${supportbot.UserNotFound}\n\nTry Again:\`${supportbot.Prefix}${supportbot.RemoveUser} <user#0000>\``)
|
||||||
.setColor(supportbot.ErrorColour)
|
.setColor(supportbot.ErrorColour)
|
||||||
|
|
||||||
if (!rUser) return message.channel.send({ embed: UserNotExist });
|
if (!rUser) return message.channel.send({ embeds: [UserNotExist] });
|
||||||
|
|
||||||
message.channel.updateOverwrite(rUser, {
|
message.channel.updateOverwrite(rUser, {
|
||||||
VIEW_CHANNEL: false,
|
VIEW_CHANNEL: false,
|
||||||
@@ -55,9 +53,9 @@ module.exports = {
|
|||||||
.setDescription(supportbot.RemovedUser.replace(/%user%/g, rUser.id))
|
.setDescription(supportbot.RemovedUser.replace(/%user%/g, rUser.id))
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
message.channel.send({ embed: Complete });
|
message.channel.send({ embeds: [Complete] });
|
||||||
} else {
|
} else {
|
||||||
return message.channel.send({ embed: NoPerms });
|
return message.channel.send({ embeds: [NoPerms] });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-11
@@ -12,23 +12,21 @@ module.exports = {
|
|||||||
description: supportbot.SuggestionDesc,
|
description: supportbot.SuggestionDesc,
|
||||||
|
|
||||||
execute(message, args) {
|
execute(message, args) {
|
||||||
if (supportbot.DeleteMessages == "true") message.delete();
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
|
||||||
let locateChannel = message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.name === supportbot.SuggestionChannel);
|
let locateChannel = message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.name === supportbot.SuggestionChannel) || message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.id === supportbot.SuggestionChannel)
|
||||||
|
|
||||||
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.SuggestCommand}!`);
|
|
||||||
|
|
||||||
const errornochannel = new Discord.MessageEmbed()
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
.setTitle("Invalid Channel")
|
.setTitle("Invalid Channel")
|
||||||
.setDescription(`${supportbot.InvalidChannel}\n\nChannel Required: \`${supportbot.SuggestionChannel}\``)
|
.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({ embeds: [errornochannel] });
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
const embed = new Discord.MessageEmbed()
|
||||||
.setDescription(`> **${supportbot.SuggestionStarter}**`)
|
.setDescription(`> **${supportbot.SuggestionStarter}**`)
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
message.channel.send({ embed: embed });
|
message.channel.send({ embeds: [embed] });
|
||||||
|
|
||||||
let suggestion = []
|
let suggestion = []
|
||||||
message.channel.awaitMessages(response => response.content.length > 2, {
|
message.channel.awaitMessages(response => response.content.length > 2, {
|
||||||
@@ -42,19 +40,29 @@ module.exports = {
|
|||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
.setFooter(supportbot.EmbedFooter)
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
|
||||||
.setTitle(supportbot.SuggestionTitle)
|
.addField(supportbot.SuggestionTitle, suggestion, true)
|
||||||
.setDescription(`\`\`\`${suggestion}\`\`\``)
|
.addField("From", `<@${message.author.id}>`, true)
|
||||||
|
|
||||||
.addFields( { name: "From", value: `<@${message.author.id}>`, inline: false }, )
|
if (supportbot.SuggestionMessage_Icon === "BOT") {
|
||||||
|
SuggestionMessage.setThumbnail(bot.user.displayAvatarURL())
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.SuggestionMessage_Icon === "USER") {
|
||||||
|
SuggestionMessage.setThumbnail(message.author.displayAvatarURL())
|
||||||
|
}
|
||||||
|
|
||||||
locateChannel.send({ embed: SuggestionMessage }).then(async function(msg) {
|
if (supportbot.SuggestionMessage_Icon === "CUSTOM") {
|
||||||
|
SuggestionMessage.setThumbnail(supportbot.SuggestionIcon_URL)
|
||||||
|
}
|
||||||
|
|
||||||
|
locateChannel.send({ embeds: [SuggestionMessage] }).then(async function(msg) {
|
||||||
msg.react(supportbot.SuggestReact_1).then(() => msg.react(supportbot.SuggestReact_2));
|
msg.react(supportbot.SuggestReact_1).then(() => msg.react(supportbot.SuggestReact_2));
|
||||||
});
|
});
|
||||||
|
|
||||||
const SuggestionComplete = new Discord.MessageEmbed()
|
const SuggestionComplete = new Discord.MessageEmbed()
|
||||||
.setColor(supportbot.SuccessColour)
|
.setColor(supportbot.SuccessColour)
|
||||||
.setDescription(`:white_check_mark: Your suggestion has been successfully created. <#${locateChannel.id}>`)
|
.setDescription(`:white_check_mark: Your suggestion has been successfully created. <#${locateChannel.id}>`)
|
||||||
message.channel.send({ embed: SuggestionComplete })
|
message.channel.send({ embeds: [SuggestionComplete] })
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,242 @@
|
|||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Ticket Command
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const { MessageButton, MessageActionRow, Permissions } = require("discord.js");
|
||||||
|
|
||||||
|
const fs = require("fs")
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
const TicketNumberID = require('../utils/TicketNumber.js');
|
||||||
|
|
||||||
|
async function asyncForEach(array, callback) {
|
||||||
|
for (let index = 0; index < array.length; index++) {
|
||||||
|
await callback(array[index], index, array);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
module.exports = {
|
||||||
|
name: supportbot.NewTicket,
|
||||||
|
description: supportbot.NewTicketDesc,
|
||||||
|
|
||||||
|
async execute(message, args) {
|
||||||
|
if (message.channel.name !== supportbot.ReactionChannel) {
|
||||||
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
let reactionUser = message.guild.members.cache.get(message.author.id)
|
||||||
|
|
||||||
|
if (reactionUser.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || reactionUser.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)) {
|
||||||
|
return message.channel.send({content:`<@${message.author.id}> ${supportbot.TicketBlackListMessage}`}).then(msg => {
|
||||||
|
setTimeout(() => msg.delete(), 3500)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ticket ID
|
||||||
|
let ticketNumberID = TicketNumberID.pad(message.guild.id);
|
||||||
|
|
||||||
|
// Ticket Subject
|
||||||
|
const TicketSubject = args || supportbot.NoTicketSubject;
|
||||||
|
|
||||||
|
const TicketExists = new Discord.MessageEmbed()
|
||||||
|
.setTitle("Ticket Exists!")
|
||||||
|
.setDescription(`${supportbot.TicketExists}`)
|
||||||
|
.setColor(supportbot.WarningColour)
|
||||||
|
|
||||||
|
if (message.guild.channels.cache.find(ticketChannel => ticketChannel.name === `${supportbot.TicketChannel}-${ticketNumberID}`)) {
|
||||||
|
return message.channel.send({ embeds: [TicketExists] });
|
||||||
|
}
|
||||||
|
const Staff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) || message.guild.roles.cache.find(SupportTeam => SupportTeam.id === supportbot.Staff)
|
||||||
|
const Admins = message.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || message.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
|
||||||
|
const DeptRole1 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_1}`) || message.guild.roles.cache.find(DepartmentRole => DepartmentRole.id === `${supportbot.DepartmentRole_1}`)
|
||||||
|
const DeptRole2 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_2}`) || message.guild.roles.cache.find(DepartmentRole => DepartmentRole.id === `${supportbot.DepartmentRole_2}`)
|
||||||
|
const DeptRole3 = message.guild.roles.cache.find(DepartmentRole => DepartmentRole.name === `${supportbot.DepartmentRole_3}`) || message.guild.roles.cache.find(DepartmentRole => DepartmentRole.id === `${supportbot.DepartmentRole_3}`)
|
||||||
|
const Author = message.author
|
||||||
|
const Everyone = message.guild.id
|
||||||
|
const ticketChannel = await message.guild.channels.create(`${supportbot.TicketChannel}-${ticketNumberID}`, {
|
||||||
|
type: "GUILD_TEXT",
|
||||||
|
})
|
||||||
|
|
||||||
|
if (message.channel.name === supportbot.ReactionChannel || message.channel.id === supportbot.ReactionChannel) {
|
||||||
|
const CreatedTicket = new Discord.MessageEmbed()
|
||||||
|
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({embeds: [CreatedTicket]}).then(msg => {
|
||||||
|
setTimeout(() => msg.delete(), 5000)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
const CreatedTicket = new Discord.MessageEmbed()
|
||||||
|
.setDescription(supportbot.TicketCreatedAlert.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
message.channel.send({embeds: [CreatedTicket]}).then(msg => setTimeout(() => msg.delete(), 5000));
|
||||||
|
}
|
||||||
|
let AllowArr = [Staff, Staff, Admins, Author]
|
||||||
|
await asyncForEach(AllowArr, (index) => {
|
||||||
|
ticketChannel.permissionOverwrites.create(index, {VIEW_CHANNEL: true})
|
||||||
|
})
|
||||||
|
|
||||||
|
let DenyArr = [Everyone]
|
||||||
|
await asyncForEach(DenyArr, (index) => {
|
||||||
|
ticketChannel.permissionOverwrites.create(index, {VIEW_CHANNEL: false})
|
||||||
|
})
|
||||||
|
|
||||||
|
let TicketCategory = message.guild.channels.cache.find(category => category.name === supportbot.TicketCategory) || message.guild.channels.cache.find(category => category.id === supportbot.TicketCategory)
|
||||||
|
if(TicketCategory) {
|
||||||
|
ticketChannel.setParent(TicketCategory.id)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.AllowTicketMentions) {
|
||||||
|
ticketChannel.send({content:`${message.author}`})
|
||||||
|
}
|
||||||
|
|
||||||
|
const TicketMessage = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.Ticket_Title.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
|
||||||
|
.setDescription(supportbot.TicketMessage.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, ticketChannel.id).replace(/%ticketusername%/g, message.author.username))
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
|
if (supportbot.TicketSubject === "embed") {
|
||||||
|
|
||||||
|
if (TicketSubject != 'No Reason Provided.') {
|
||||||
|
TicketMessage.addFields({ name: 'Reason', value: TicketSubject })
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.TicketSubject === "description") {
|
||||||
|
|
||||||
|
if (TicketSubject != 'No Reason Provided.') {
|
||||||
|
ticketChannel.setTopic(`Reason: ${TicketSubject} - User ID: ${message.author.id} - Ticket: ${ticketChannel.name}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.TicketDepartments) {
|
||||||
|
TicketMessage.addFields({ name: 'Departments', value: ` **${supportbot.DepartmentTitle_1}**\n **${supportbot.DepartmentTitle_2}**\n **${supportbot.DepartmentTitle_3}**` })
|
||||||
|
}
|
||||||
|
const CloseButton = new MessageButton()
|
||||||
|
.setCustomId('ticketclose')
|
||||||
|
.setLabel('Close')
|
||||||
|
.setStyle(supportbot.TicketCloseColour)
|
||||||
|
.setEmoji(supportbot.TicketCloseEmoji)
|
||||||
|
|
||||||
|
const LockButton = new MessageButton()
|
||||||
|
.setCustomId('ticketlock')
|
||||||
|
.setLabel('Lock')
|
||||||
|
.setStyle(supportbot.TicketLockColour)
|
||||||
|
.setEmoji(supportbot.TicketLockEmoji)
|
||||||
|
|
||||||
|
const row2 = new MessageActionRow()
|
||||||
|
.addComponents(CloseButton, LockButton)
|
||||||
|
|
||||||
|
if(supportbot.TicketDepartments) {
|
||||||
|
|
||||||
|
let DenyArr = [DeptRole1, DeptRole2, DeptRole3]
|
||||||
|
await asyncForEach(DenyArr, (index) => {
|
||||||
|
ticketChannel.permissionOverwrites.create(index, {VIEW_CHANNEL: false})
|
||||||
|
})
|
||||||
|
const Department1Button = new MessageButton()
|
||||||
|
.setCustomId('Department1')
|
||||||
|
.setLabel(`${supportbot.DepartmentTitle_1}`)
|
||||||
|
.setStyle(supportbot.TicketDept1Colour)
|
||||||
|
.setEmoji(supportbot.TicketDept1Emoji)
|
||||||
|
|
||||||
|
const Department2Button = new MessageButton()
|
||||||
|
.setCustomId('Department2')
|
||||||
|
.setLabel(`${supportbot.DepartmentTitle_2}`)
|
||||||
|
.setStyle(supportbot.TicketDept2Colour)
|
||||||
|
.setEmoji(supportbot.TicketDept2Emoji)
|
||||||
|
|
||||||
|
const Department3Button = new MessageButton()
|
||||||
|
.setCustomId('Department3')
|
||||||
|
.setLabel(`${supportbot.DepartmentTitle_3}`)
|
||||||
|
.setStyle(supportbot.TicketDept3Colour)
|
||||||
|
.setEmoji(supportbot.TicketDept3Emoji)
|
||||||
|
|
||||||
|
const row = new MessageActionRow()
|
||||||
|
.addComponents(Department1Button, Department2Button, Department3Button)
|
||||||
|
|
||||||
|
const m = await ticketChannel.send({embeds: [TicketMessage], components: [row]})
|
||||||
|
|
||||||
|
const filter = i => {
|
||||||
|
i.deferUpdate();
|
||||||
|
return i.user.id === message.author.id;
|
||||||
|
};
|
||||||
|
const collector = m.createMessageComponentCollector({ filter, max: 1, componentType: 'BUTTON', time: 60000 });
|
||||||
|
|
||||||
|
collector.on('collect',async (i) => {
|
||||||
|
|
||||||
|
if(i.customId === 'Department1') {
|
||||||
|
|
||||||
|
ticketChannel.permissionOverwrites.edit(DeptRole1, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
READ_MESSAGE_HISTORY: true,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
if(!supportbot.AllowStaff) {
|
||||||
|
ticketChannel.permissionOverwrites.edit(Staff, { VIEW_CHANNEL: false, READ_MESSAGE_HISTORY: false, SEND_MESSAGES: false })
|
||||||
|
}
|
||||||
|
|
||||||
|
const Department1 = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> Thank for reaching out to the **${supportbot.DepartmentTitle_1} Department**. Please provide us information regarding your query.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
ticketChannel.send({ embeds: [Department1] });
|
||||||
|
|
||||||
|
if (supportbot.AllowTicketMentions) {
|
||||||
|
ticketChannel.send({content: `@here`})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
i.message.edit({embeds: [TicketMessage], components: [row2]})
|
||||||
|
|
||||||
|
if(i.customId === 'Department2') {
|
||||||
|
|
||||||
|
ticketChannel.permissionOverwrites.edit(DeptRole2, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
READ_MESSAGE_HISTORY: true,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
if(!supportbot.AllowStaff) {
|
||||||
|
ticketChannel.permissionOverwrites.edit(Staff, { VIEW_CHANNEL: false, READ_MESSAGE_HISTORY: false, SEND_MESSAGES: false })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const Department2 = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> Thank for reaching out to the **${supportbot.DepartmentTitle_2} Department**. Please provide us information regarding your query.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
ticketChannel.send({ embeds: [Department2] });
|
||||||
|
|
||||||
|
if (supportbot.AllowTicketMentions) {
|
||||||
|
ticketChannel.send({content: `@here`})
|
||||||
|
}
|
||||||
|
|
||||||
|
i.message.edit({embeds: [TicketMessage], components: [row2]})
|
||||||
|
}
|
||||||
|
if(i.customId === 'Department3') {
|
||||||
|
|
||||||
|
ticketChannel.permissionOverwrites.edit(DeptRole3, {
|
||||||
|
VIEW_CHANNEL: true,
|
||||||
|
READ_MESSAGE_HISTORY: true,
|
||||||
|
SEND_MESSAGES: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
if(!supportbot.AllowStaff) {
|
||||||
|
ticketChannel.permissionOverwrites.edit(Staff, { VIEW_CHANNEL: false, READ_MESSAGE_HISTORY: false, SEND_MESSAGES: false })
|
||||||
|
}
|
||||||
|
|
||||||
|
const Department3 = new Discord.MessageEmbed()
|
||||||
|
.setDescription(`> Thank for reaching out to the **${supportbot.DepartmentTitle_3} Department**. Please provide us information regarding your query.`)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
ticketChannel.send({ embeds: [Department3] });
|
||||||
|
|
||||||
|
if (supportbot.AllowTicketMentions) {
|
||||||
|
ticketChannel.send({content: `@here`})
|
||||||
|
}
|
||||||
|
i.message.edit({embeds: [TicketMessage], components: [row2]})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
ticketChannel.send({embeds: [TicketMessage], components: [row2]})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
|
||||||
|
// SupportBot, Created by Emerald Services
|
||||||
|
// Announce
|
||||||
|
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.ChatLog,
|
||||||
|
description: supportbot.ChatLogDesc,
|
||||||
|
execute(message, args) {
|
||||||
|
if (supportbot.DeleteMessages) message.delete();
|
||||||
|
let name = message.channel.name;
|
||||||
|
|
||||||
|
message.channel.messages.fetch({ limit: 100 }).then( msgs => {
|
||||||
|
let html = '';
|
||||||
|
|
||||||
|
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
||||||
|
html += `<strong>--- Channel Transcript ---</strong><br>`;
|
||||||
|
html += `<strong>Server Name:</strong> ${message.guild.name}<br>`;
|
||||||
|
html += `<strong>Channel:</strong> ${name}<br>`;
|
||||||
|
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`;
|
||||||
|
|
||||||
|
msgs.forEach( msg => {
|
||||||
|
if ( msg.content ) {
|
||||||
|
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
|
||||||
|
html += `<strong>Message:</strong> ${msg.content}<br>`;
|
||||||
|
html += `-----<br><br>`;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const TranscriptSavedEmbed = new Discord.MessageEmbed()
|
||||||
|
.setDescription(supportbot.ChatLogSavedMessage)
|
||||||
|
.setColor(supportbot.SuccessColour)
|
||||||
|
message.channel.send({embeds: [TranscriptSavedEmbed]})
|
||||||
|
const errornochannel = new Discord.MessageEmbed()
|
||||||
|
.setTitle("SupportBot Error!")
|
||||||
|
.setDescription(`:x: **Error!** Channel not Found, This command cannot be executed proberbly as their is no channel within this server.\nThis is configurable via **supportbot-config.yml**\n\nChannel Required: \`${supportbot.ChatLogChannel}\`\n\nError Code: \`SB-03\``)
|
||||||
|
.setColor(supportbot.ErrorColour);
|
||||||
|
|
||||||
|
const ChatLogs = new Discord.MessageEmbed()
|
||||||
|
.setTitle(supportbot.ChatLog_Title)
|
||||||
|
.setThumbnail(supportbot.ChatLog_Thumbnail)
|
||||||
|
.addFields(
|
||||||
|
{ name: 'Channel', value: `<#${message.channel.id}>` },
|
||||||
|
{ name: 'User', value: `<@${message.author.id}>` },
|
||||||
|
)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
let locateChannel = message.guild.channels.cache.find(LocateChannel => LocateChannel.name === supportbot.ChatLogChannel) || message.guild.channels.cache.find(LocateChannel => LocateChannel.id === supportbot.ChatLogChannel)
|
||||||
|
|
||||||
|
if(!locateChannel) return message.channel.send({ embeds: [errornochannel] });
|
||||||
|
|
||||||
|
let file = new Discord.MessageAttachment( Buffer.from( html ), `${name}.html` )
|
||||||
|
locateChannel.send({embeds: [ChatLogs], files: [file]})
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,18 +9,23 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
|
|||||||
|
|
||||||
module.exports = async (bot, member) => {
|
module.exports = async (bot, member) => {
|
||||||
|
|
||||||
if (supportbot.SystemMessages === "true") {
|
if (supportbot.SystemMessages) {
|
||||||
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel)
|
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel) || member.guild.channels.cache.get(supportbot.SystemMessage_Channel)
|
||||||
|
|
||||||
if (!SystemChannel) return;
|
if (!SystemChannel) return;
|
||||||
|
|
||||||
console.log(`[${supportbot.Bot_Name}]: ${member.user.username} has joined ${member.guild.name}!`)
|
console.log(`[${supportbot.Bot_Name}]: ${member.user.username} has joined ${member.guild.name}!`)
|
||||||
console.log(supportbot.AutoRole_Role)
|
console.log(supportbot.AutoRole_Role)
|
||||||
|
|
||||||
|
const role = member.guild.roles.cache.find(role => role.name === supportbot.AutoRole_Role) || member.guild.roles.cache.find(role => role.id === supportbot.AutoRole_Role)
|
||||||
|
|
||||||
|
member.roles.add(role).catch(console.error);
|
||||||
|
|
||||||
if (supportbot.SystemMessage_Type === "embed") {
|
if (supportbot.SystemMessage_Type === "embed") {
|
||||||
|
|
||||||
const GuildAddMember = new Discord.MessageEmbed()
|
const GuildAddMember = new Discord.MessageEmbed()
|
||||||
.setTitle(supportbot.Welcome_Title)
|
.setTitle(supportbot.Welcome_Title)
|
||||||
.setDescription(supportbot.WelcomeMessage.replace(/%member%/g, member.user.username).replace(/%guildname%/g, member.guild.name))
|
.setDescription(supportbot.WelcomeMessage.replace(/%member%/g, `<@!${member.user.id}>`).replace(/%guildname%/g, member.guild.name))
|
||||||
.setColor(supportbot.EmbedColour)
|
.setColor(supportbot.EmbedColour)
|
||||||
|
|
||||||
if (supportbot.SystemMessage_Icon === "BOT") {
|
if (supportbot.SystemMessage_Icon === "BOT") {
|
||||||
@@ -31,8 +36,12 @@ module.exports = async (bot, member) => {
|
|||||||
GuildAddMember.setThumbnail(member.user.displayAvatarURL())
|
GuildAddMember.setThumbnail(member.user.displayAvatarURL())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (supportbot.SystemMessage_Icon === "CUSTOM") {
|
||||||
|
SuggestionMessage.setThumbnail(supportbot.SystemMessageIcon_URL)
|
||||||
|
}
|
||||||
|
|
||||||
if (supportbot.SystemMessage_EmbedFooter === "true") {
|
|
||||||
|
if (supportbot.SystemMessage_EmbedFooter) {
|
||||||
GuildAddMember.setFooter(supportbot.EmbedFooter)
|
GuildAddMember.setFooter(supportbot.EmbedFooter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'))
|
|||||||
|
|
||||||
module.exports = async (bot, member) => {
|
module.exports = async (bot, member) => {
|
||||||
|
|
||||||
if (supportbot.SystemMessages === "true") {
|
if (supportbot.SystemMessages) {
|
||||||
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel)
|
const SystemChannel = member.guild.channels.cache.find(channel => channel.name === supportbot.SystemMessage_Channel) || member.guild.channels.cache.get(supportbot.SystemMessage_Channel)
|
||||||
|
|
||||||
if (!SystemChannel) return;
|
if (!SystemChannel) return;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,128 @@
|
|||||||
|
// SupportBot Interaction Event
|
||||||
|
// SupportBot Created by Emerald Services
|
||||||
|
|
||||||
|
const fs = require("fs");
|
||||||
|
const { MessageEmbed, MessageAttachment, Permissions, MessageButton, MessageActionRow } = require("discord.js");
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
module.exports = async (bot, interaction, args) => {
|
||||||
|
|
||||||
|
if (interaction.isCommand()) return;
|
||||||
|
|
||||||
|
if(interaction.isButton()) {
|
||||||
|
if(interaction.customId === 'openticket') {
|
||||||
|
interaction.message.fetch()
|
||||||
|
interaction.deferUpdate()
|
||||||
|
let message = {
|
||||||
|
guild: bot.guilds.cache.get(interaction.message.guildId),
|
||||||
|
author: bot.users.cache.get(interaction.user.id),
|
||||||
|
content: "N/A",
|
||||||
|
channel: bot.channels.cache.get(interaction.message.channelId)
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const cmd = bot.commands.get(supportbot.NewTicket);
|
||||||
|
if(!cmd) return;
|
||||||
|
cmd.execute(message, message.content)
|
||||||
|
}
|
||||||
|
catch (error){
|
||||||
|
console.error(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(interaction.customId === 'ticketclose') {
|
||||||
|
if(interaction.channel.name.startsWith(`${supportbot.TicketChannel}-`)) {
|
||||||
|
interaction.message.fetch()
|
||||||
|
interaction.deferUpdate()
|
||||||
|
const DeleteTicketEmbed = new MessageEmbed()
|
||||||
|
.setDescription(supportbot.TicketDeleteMessage)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
interaction.channel.send({embeds: [DeleteTicketEmbed]})
|
||||||
|
|
||||||
|
let logChannel = interaction.guild.channels.cache.find(channel => channel.name === supportbot.TranscriptLog) || interaction.guild.channels.cache.find(channel => channel.id === supportbot.TranscriptLog)
|
||||||
|
|
||||||
|
let user = interaction.user
|
||||||
|
let name = interaction.channel.name;
|
||||||
|
let ticketChannel = interaction.channel
|
||||||
|
let reason = "No Reason Provided."
|
||||||
|
|
||||||
|
interaction.channel.send({content: `**${supportbot.ClosingTicket}**`})
|
||||||
|
.then(() => {
|
||||||
|
const logEmbed = new MessageEmbed()
|
||||||
|
.setTitle(supportbot.TranscriptTitle)
|
||||||
|
.setColor(supportbot.EmbedColour)
|
||||||
|
.setFooter(supportbot.EmbedFooter)
|
||||||
|
.addField("Closed By", user.username)
|
||||||
|
.addField("Reason", reason)
|
||||||
|
|
||||||
|
interaction.channel.messages.fetch({limit: 100}).then(msgs => {
|
||||||
|
let html = ''
|
||||||
|
|
||||||
|
msgs = msgs.sort( ( a, b ) => a.createdTimestamp - b.createdTimestamp );
|
||||||
|
html += `<strong>Server Name:</strong> ${interaction.guild.name}<br>`
|
||||||
|
html += `<strong>Ticket:</strong> ${ticketChannel.name}<br>`
|
||||||
|
html += `<strong>Message:</strong> ${msgs.size} Messages<br><br><br>`
|
||||||
|
|
||||||
|
|
||||||
|
msgs.forEach(msg => {
|
||||||
|
if(msg.content) {
|
||||||
|
html += `<strong>User:</strong> ${msg.author.tag}<br>`;
|
||||||
|
html += `<strong>Message:</strong> ${msg.content}<br>`;
|
||||||
|
html += `-----<br><br>`;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const TranscriptSavedEmbed = new MessageEmbed()
|
||||||
|
.setDescription(supportbot.TranscriptSavedMessage)
|
||||||
|
.setColor(supportbot.SuccessColour)
|
||||||
|
interaction.channel.send({embeds: [TranscriptSavedEmbed]})
|
||||||
|
|
||||||
|
let file = new MessageAttachment( Buffer.from( html ), `${name}.html` )
|
||||||
|
logChannel.send({embeds: [logEmbed], files: [file]})
|
||||||
|
|
||||||
|
setTimeout(() => interaction.channel.delete(), supportbot.TicketDeleteTime)
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(interaction.customId === 'ticketlock') {
|
||||||
|
if(interaction.channel.name.startsWith(`${supportbot.TicketChannel}`)) {
|
||||||
|
interaction.message.fetch()
|
||||||
|
interaction.deferUpdate()
|
||||||
|
let Admin = interaction.guild.roles.cache.find(AdminUser => AdminUser.name === supportbot.Admin) || interaction.guild.roles.cache.find(AdminUser => AdminUser.id === supportbot.Admin)
|
||||||
|
let all = interaction.channel.permissionOverwrites.cache
|
||||||
|
|
||||||
|
let parent = interaction.guild.channels.cache.find(c => c.name === `${supportbot.LockTicketCategory}`) || interaction.guild.channels.cache.find(c => c.id === `${supportbot.LockTicketCategory}`)
|
||||||
|
if(parent) {
|
||||||
|
interaction.channel.setParent(parent.id)
|
||||||
|
}
|
||||||
|
|
||||||
|
all.forEach(perm => {
|
||||||
|
interaction.channel.permissionOverwrites.delete(perm.id)
|
||||||
|
|
||||||
|
})
|
||||||
|
interaction.channel.permissionOverwrites.create(Admin.id, {VIEW_CHANNEL: true})
|
||||||
|
|
||||||
|
interaction.channel.permissionOverwrites.create(interaction.guild.id, {VIEW_CHANNEL: false})
|
||||||
|
|
||||||
|
|
||||||
|
const ticketDeleteButton = new MessageButton()
|
||||||
|
.setCustomId('ticketclose')
|
||||||
|
.setLabel('Close')
|
||||||
|
.setStyle(supportbot.TicketDeleteColour)
|
||||||
|
.setEmoji(supportbot.TicketDeleteEmoji)
|
||||||
|
|
||||||
|
const row = new MessageActionRow()
|
||||||
|
.addComponents(ticketDeleteButton)
|
||||||
|
const ArchiveEmbed = new MessageEmbed()
|
||||||
|
.setTitle("Archived")
|
||||||
|
.setDescription(`Archived ${interaction.channel.name}`)
|
||||||
|
.setColor(`${supportbot.SuccessColour}`)
|
||||||
|
|
||||||
|
interaction.channel.send({embeds: [ArchiveEmbed]})
|
||||||
|
interaction.message.edit({components: [row]})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,6 +15,8 @@ module.exports = async (bot, message) => {
|
|||||||
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();
|
||||||
|
|
||||||
|
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]`, `\u001b[36m`, `${message.author.tag}`, `\u001b[33m`, `has executed the command`, `\u001b[36m`,`${supportbot.Prefix}${command}`)
|
||||||
|
|
||||||
const cmd = bot.commands.get(command);
|
const cmd = bot.commands.get(command);
|
||||||
if(!cmd) return;
|
if(!cmd) return;
|
||||||
@@ -13,20 +13,20 @@ module.exports = async (client, reaction, user) => {
|
|||||||
let message = {
|
let message = {
|
||||||
guild: reaction.message.channel.guild,
|
guild: reaction.message.channel.guild,
|
||||||
author: user,
|
author: user,
|
||||||
content: "Not available",
|
content: "N/A",
|
||||||
channel: reaction.message.channel
|
channel: reaction.message.channel
|
||||||
}
|
}
|
||||||
|
|
||||||
if (supportbot.ReactionTickets === "true") {
|
if (supportbot.ReactionTickets) {
|
||||||
if (reaction.message.id === tickets.ReactionMessage_ID) {
|
if (reaction.message.id === tickets.ReactionMessage_ID) {
|
||||||
if (reaction.emoji.name == supportbot.ReactionEmoji || reaction.emoji.id == supportbot.ReactionEmoji) {
|
if (reaction.emoji.name == supportbot.ReactionEmoji || reaction.emoji.id == supportbot.ReactionEmoji) {
|
||||||
await reaction.users.remove(user.id)
|
await reaction.users.remove(user.id)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const cmd = client.commands.get("ticket");
|
const cmd = client.commands.get(supportbot.NewTicket);
|
||||||
if(!cmd) return;
|
if(!cmd) return;
|
||||||
|
|
||||||
cmd.execute(message, "undefined");
|
cmd.execute(message, message.content);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
const Discord = require("discord.js");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
const yaml = require('js-yaml');
|
||||||
|
const supportbot = yaml.load(fs.readFileSync('./supportbot-config.yml', 'utf8'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
module.exports = async (bot, message, packet) => {
|
||||||
|
if (!['MESSAGE_REACTION_ADD', 'MESSAGE_REACTION_REMOVE'].includes(packet.t)) return;
|
||||||
|
|
||||||
|
const channel = bot.channels.cache.get(packet.d.channel_id);
|
||||||
|
if (channel.messages.has(packet.d.message_id)) return;
|
||||||
|
|
||||||
|
channel.messages.fetch(packet.d.message_id).then(message => {
|
||||||
|
const emoji = packet.d.emoji.id ? `${packet.d.emoji.name}:${packet.d.emoji.id}` : packet.d.emoji.name;
|
||||||
|
const reaction = message.reactions.get(emoji);
|
||||||
|
if (reaction) reaction.users.set(packet.d.user_id, bot.users.get(packet.d.user_id));
|
||||||
|
if (packet.t === 'MESSAGE_REACTION_ADD') {
|
||||||
|
bot.emit('messageReactionAdd', reaction, bot.users.get(packet.d.user_id));
|
||||||
|
}
|
||||||
|
if (packet.t === 'MESSAGE_REACTION_REMOVE') {
|
||||||
|
bot.emit('messageReactionRemove', reaction, bot.users.get(packet.d.user_id));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
+52
-14
@@ -3,24 +3,42 @@
|
|||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
const { MessageActionRow, MessageButton } = require('discord.js');
|
||||||
|
|
||||||
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'));
|
||||||
const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'));
|
const tickets = yaml.load(fs.readFileSync('./storage/ticketreaction.yml', 'utf8'));
|
||||||
|
|
||||||
|
|
||||||
module.exports = async (bot) => {
|
module.exports = async bot => {
|
||||||
bot.user.setActivity(supportbot.BotActivity, {
|
bot.user.setActivity(supportbot.BotActivity, {
|
||||||
type: supportbot.ActivityType,
|
type: supportbot.ActivityType,
|
||||||
url: supportbot.StreamingURL
|
url: supportbot.StreamingURL
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
|
console.log(`\u001b[32m`, `┏━━━┓╋╋╋╋╋╋╋╋╋╋╋╋╋┏┓┏━━┓╋╋╋┏┓`)
|
||||||
console.log(`\u001b[37m`, `${supportbot.Bot_Name} has successfully connected to discord`)
|
console.log(`\u001b[32m`, `┃┏━┓┃╋╋╋╋╋╋╋╋╋╋╋╋┏┛┗┫┏┓┃╋╋┏┛┗┓`)
|
||||||
console.log(`\u001b[32m`, `―――――――――――――――――― SupportBot ――――――――――――――――――`)
|
console.log(`\u001b[32m`, `┃┗━━┳┓┏┳━━┳━━┳━━┳┻┓┏┫┗┛┗┳━┻┓┏┛`)
|
||||||
|
console.log(`\u001b[32m`, `┗━━┓┃┃┃┃┏┓┃┏┓┃┏┓┃┏┫┃┃┏━┓┃┏┓┃┃`)
|
||||||
|
console.log(`\u001b[32m`, `┃┗━┛┃┗┛┃┗┛┃┗┛┃┗┛┃┃┃┗┫┗━┛┃┗┛┃┗┓`)
|
||||||
|
console.log(`\u001b[32m`, `┗━━━┻━━┫┏━┫┏━┻━━┻┛┗━┻━━━┻━━┻━┛`)
|
||||||
|
console.log(`\u001b[32m`, `┗╋╋╋╋╋╋╋┃┃╋┃┃`)
|
||||||
|
console.log(`\u001b[32m`, `╋╋╋╋╋╋╋┗┛╋┗┛`)
|
||||||
|
console.log(` `)
|
||||||
|
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
|
||||||
|
console.log(` `)
|
||||||
|
console.log(`\u001b[33m`, `${supportbot.Bot_Name} v${supportbot.SupportBot_Version}`, `\u001b[36m`, `Connected to Discord`)
|
||||||
|
console.log(`\u001b[33m`, `Documentation:`, `\u001b[36m`, `https://supportbot.emeraldsrv.dev`)
|
||||||
|
console.log(`\u001b[33m`, `Discord:`, `\u001b[36m`, `https://emeraldsrv.dev/discord`)
|
||||||
|
console.log(`\u001b[33m`, `Hosting:`, `\u001b[36m`, `https://emeraldsrv.dev/hosting`)
|
||||||
|
console.log(` `)
|
||||||
|
console.log(`\u001b[37m`, `SupportBot proudly created by Emerald Services`)
|
||||||
|
console.log(` `)
|
||||||
|
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
|
||||||
|
|
||||||
|
|
||||||
if (supportbot.ReactionTickets === "true") {
|
|
||||||
|
if (supportbot.ReactionTickets) {
|
||||||
let chan1 = bot.channels.cache.find(channel => channel.name === supportbot.ReactionChannel)
|
let chan1 = bot.channels.cache.find(channel => channel.name === supportbot.ReactionChannel)
|
||||||
|
|
||||||
if (!chan1) {
|
if (!chan1) {
|
||||||
@@ -28,14 +46,36 @@ module.exports = async (bot) => {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
chan1.messages.fetch(tickets.ReactionMessage_ID).catch(r => {
|
chan1.messages.fetch(tickets.ReactionMessage_ID).catch(async r => {
|
||||||
let embed = new Discord.MessageEmbed()
|
let embed = new Discord.MessageEmbed()
|
||||||
.setTitle(supportbot.ReactionMessage.replace(/%reaction_emoji%/g, supportbot.ReactionEmoji))
|
.setTitle(supportbot.ReactionMessage.replace(/%reaction_emoji%/g, supportbot.ReactionEmoji))
|
||||||
.setColor(supportbot.SuccessColour)
|
.setColor(supportbot.SuccessColour)
|
||||||
.setFooter(supportbot.EmbedFooter);
|
.setFooter(supportbot.EmbedFooter);
|
||||||
|
|
||||||
|
if (supportbot.ReactionPanel_Description) {
|
||||||
|
embed.setDescription(supportbot.ReactionDescription)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (supportbot.ReactionPanel_Thumbnail) {
|
||||||
|
embed.setThumbnail(supportbot.ReactionThumbnail)
|
||||||
|
}
|
||||||
|
|
||||||
bot.channels.cache.find(channel => channel.name === supportbot.ReactionChannel).send({
|
if (supportbot.ReactionPanel_Image) {
|
||||||
embed: embed
|
embed.setImage(supportbot.ReactionImage)
|
||||||
|
}
|
||||||
|
|
||||||
|
let button = new MessageButton()
|
||||||
|
.setLabel('Open Ticket')
|
||||||
|
.setCustomId('openticket')
|
||||||
|
.setStyle('PRIMARY')
|
||||||
|
|
||||||
|
let row = new MessageActionRow()
|
||||||
|
.addComponents(button)
|
||||||
|
|
||||||
|
|
||||||
|
await chan1.send({
|
||||||
|
embeds: [embed],
|
||||||
|
components: [row]
|
||||||
}).then(r => {
|
}).then(r => {
|
||||||
let data = {
|
let data = {
|
||||||
"ReactionMessage_ID": `${r.id}`
|
"ReactionMessage_ID": `${r.id}`
|
||||||
@@ -43,12 +83,10 @@ module.exports = async (bot) => {
|
|||||||
let yamlStr = yaml.dump(data);
|
let yamlStr = yaml.dump(data);
|
||||||
fs.writeFileSync('./storage/ticketreaction.yml', yamlStr, 'utf8');
|
fs.writeFileSync('./storage/ticketreaction.yml', yamlStr, 'utf8');
|
||||||
|
|
||||||
r.react(supportbot.ReactionEmoji);
|
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
console.log(e)
|
console.log("Raw"+e)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
};
|
||||||
};
|
|
||||||
@@ -1,21 +1,26 @@
|
|||||||
// _________ __ __________ __
|
// ___ _ ___ _
|
||||||
// / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
// / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
|
||||||
// \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
// \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
|
||||||
// / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
// <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
|
||||||
// /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
// |_| |_|
|
||||||
// \/ |__| |__| \/
|
|
||||||
//
|
//
|
||||||
// SupportBot version 6.1
|
// SupportBot created by Emerald Services
|
||||||
// Created by Emerald Services
|
// Installed with MIT License
|
||||||
// Installed with MIT License
|
|
||||||
//
|
//
|
||||||
// Support Server: discord.gg/jspKFcE
|
// Discord Support: https://emeraldsrv.dev/discord
|
||||||
|
|
||||||
|
// const Discord = require("discord.js");
|
||||||
|
const { Client, Intents, Collection } = require("discord.js");
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const bot = new Discord.Client();
|
|
||||||
|
|
||||||
bot.commands = new Discord.Collection();
|
const bot = new Client({
|
||||||
|
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES]
|
||||||
|
});
|
||||||
|
|
||||||
|
const { REST } = require('@discordjs/rest');
|
||||||
|
|
||||||
|
bot.commands = new Collection();
|
||||||
|
|
||||||
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'));
|
||||||
@@ -33,23 +38,30 @@ String.prototype.toProperCase = function () {
|
|||||||
const init = async () => {
|
const init = async () => {
|
||||||
const evtFiles = await readdir("./events/");
|
const evtFiles = await readdir("./events/");
|
||||||
|
|
||||||
|
console.info(`\u001b[36m`, `➢ SupportBot Events`);
|
||||||
|
console.info(` `);
|
||||||
|
|
||||||
evtFiles.forEach((file, i) => {
|
evtFiles.forEach((file, i) => {
|
||||||
const eventName = file.split(".")[0];
|
const eventName = file.split(".")[0];
|
||||||
const event = require(`./events/${file}`);
|
const event = require(`./events/${file}`);
|
||||||
|
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `#${i + 1} Event Loaded: ${eventName.toProperCase()} `);
|
||||||
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Event Loaded: ${eventName.toProperCase()} `);
|
|
||||||
|
|
||||||
bot.on(eventName, event.bind(null, bot));
|
bot.on(eventName, event.bind(null, bot));
|
||||||
delete require.cache[require.resolve(`./events/${file}`)];
|
delete require.cache[require.resolve(`./events/${file}`)];
|
||||||
});
|
});
|
||||||
|
|
||||||
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `Successfully loaded ${evtFiles.length} events.`);
|
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `Successfully loaded ${evtFiles.length} events.`);
|
||||||
console.info(`\u001b[37m`, "-----------------------------------------------------------------------------");
|
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
|
||||||
|
console.log(` `)
|
||||||
};
|
};
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
fs.readdir("./commands/", (err, files) => {
|
fs.readdir("./commands/", async (err, files) => {
|
||||||
|
|
||||||
|
console.info(`\u001b[36m`, `➢ SupportBot Commands`);
|
||||||
|
console.info(` `);
|
||||||
|
|
||||||
if (err) console.info(err, "error");
|
if (err) console.info(err, "error");
|
||||||
|
|
||||||
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
|
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
|
||||||
@@ -61,32 +73,40 @@ fs.readdir("./commands/", (err, files) => {
|
|||||||
|
|
||||||
jsfiles.forEach((f, i) => {
|
jsfiles.forEach((f, i) => {
|
||||||
let props = require(`./commands/${f}`);
|
let props = require(`./commands/${f}`);
|
||||||
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
|
|
||||||
|
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
|
||||||
bot.commands.set(props.name, props);
|
bot.commands.set(props.name, props);
|
||||||
});
|
});
|
||||||
|
|
||||||
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `Loaded ${jsfiles.length} commands!`);
|
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `Loaded ${jsfiles.length} commands!`);
|
||||||
console.info(`\u001b[37m`, "-----------------------------------------------------------------------------");
|
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
|
||||||
|
console.log(` `)
|
||||||
});
|
});
|
||||||
|
|
||||||
fs.readdir("./addons/", (err, files) => {
|
fs.readdir("./addons/", (err, files) => {
|
||||||
|
|
||||||
|
console.info(`\u001b[36m`, `➢ SupportBot Addons`);
|
||||||
|
console.info(` `);
|
||||||
|
|
||||||
if (err) console.info(err, "error");
|
if (err) console.info(err, "error");
|
||||||
|
|
||||||
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
|
let jsfiles = files.filter((f) => f.split(".").pop() === "js");
|
||||||
|
|
||||||
if (jsfiles.length <= 0) {
|
if (jsfiles.length <= 0) {
|
||||||
console.log(`[${supportbot.Bot_Name}]: No addons found. You can download addons from https://emeraldservices.xyz`);
|
console.log(`[${supportbot.Bot_Name}]: No addons found. You can download addons from https://emeraldsrv.dev`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
jsfiles.forEach((f, i) => {
|
jsfiles.forEach((f, i) => {
|
||||||
let props = require(`./addons/${f}`);
|
let props = require(`./addons/${f}`);
|
||||||
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[31m`, `#${i + 1} Command Loaded: ${props.name.toProperCase()}`);
|
|
||||||
|
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `#${i + 1} Addon Loaded: ${props.name.toProperCase()}`);
|
||||||
bot.commands.set(props.name, props);
|
bot.commands.set(props.name, props);
|
||||||
});
|
});
|
||||||
|
|
||||||
console.info(`\u001b[37m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `Loaded ${jsfiles.length} commands!`);
|
console.info(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[36m`, `Loaded ${jsfiles.length} addons!`);
|
||||||
console.info(`\u001b[37m`, "-----------------------------------------------------------------------------");
|
console.log(`\u001b[31m`, `――――――――――――――――――――――――――――――――――――――――――――`)
|
||||||
|
console.log(` `)
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.login(supportbot.Token);
|
bot.login(supportbot.Token);
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
SupportBot Language Compatibility
|
||||||
|
|
||||||
|
In order to switch languages simple remove the current existig configuration file and replace it with one of the files here renamnig the file to "supportbot-config.yml" from (for example) "supportbot-config_es.yml" to home directory of SupportBot.
|
||||||
|
|
||||||
|
-> Delete the existing supportbot-config.yml file
|
||||||
|
-> Download the new file for whatever language
|
||||||
|
-> Upload the file to SupportBot and rename it to supportbot-config.yml
|
||||||
|
-> Job Done, restart the bot :wink:
|
||||||
@@ -0,0 +1,310 @@
|
|||||||
|
# ___ _ ___ _
|
||||||
|
# / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
|
||||||
|
# \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
|
||||||
|
# <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
|
||||||
|
# |_| |_|
|
||||||
|
#
|
||||||
|
# SupportBot created by Emerald Services
|
||||||
|
# Installed with MIT License
|
||||||
|
#
|
||||||
|
# Discord Support: https://emeraldsrv.dev/discord
|
||||||
|
|
||||||
|
SupportBot_Version: "7.1 pre-1"
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# General Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
Token: "BOT_TOKEN_HERE"
|
||||||
|
Prefix: "!!"
|
||||||
|
Bot_Name: "SupportBot"
|
||||||
|
|
||||||
|
DeleteMessages: true
|
||||||
|
# Should the bot delete command messages after executed?
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# Activity Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
BotActivity: "-help | SupportBot"
|
||||||
|
|
||||||
|
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||||
|
# Set The ActivityType to "STREAMING" for a streaming status!
|
||||||
|
|
||||||
|
ActivityType: "PLAYING"
|
||||||
|
# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING.
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# Embed Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
EmbedColour: "#f74343"
|
||||||
|
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
|
||||||
|
|
||||||
|
ErrorColour: "#d12519"
|
||||||
|
SuccessColour: "#04b545"
|
||||||
|
WarningColour: "#fca117"
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# Help Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
HelpMenu: true # Do not change!
|
||||||
|
SendHelpPage: "channel" # Set to channel or dm
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# Role Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
AutoRole: true
|
||||||
|
AutoRole_Role: "Member"
|
||||||
|
LockdownRole: "@everyone"
|
||||||
|
|
||||||
|
Staff: "Staff"
|
||||||
|
Admin: "Admin"
|
||||||
|
TicketBlackListRole: "Blacklisted"
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# Tickets Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
# --- General Config ---
|
||||||
|
# --- Start ---
|
||||||
|
|
||||||
|
TicketCategory: "▬▬ TICKETS ▬▬"
|
||||||
|
TicketChannel: "ticket"
|
||||||
|
|
||||||
|
TicketLog: "ticket-logs"
|
||||||
|
TranscriptLog: "transcripts"
|
||||||
|
|
||||||
|
TranscriptTitle: "Ticket Transcript"
|
||||||
|
TicketBlackListMessage: "You are not allowed to open a ticket"
|
||||||
|
|
||||||
|
TicketSubject: "description"
|
||||||
|
# "description" will displays the ticket reason within the channel description
|
||||||
|
# "embed" will displays the ticket reason within the ticket embed
|
||||||
|
|
||||||
|
AllowTicketMentions: true
|
||||||
|
# Set to true to allow the ticket to mention the author and the support team.
|
||||||
|
# Set to false to dis-allow mentions within tickets.
|
||||||
|
|
||||||
|
# --- Panel Config ---
|
||||||
|
# --- Start ---
|
||||||
|
|
||||||
|
ReactionChannel: "create-ticket"
|
||||||
|
ReactionEmoji: "📩"
|
||||||
|
# For cusomt emojis: <:emoji_name:EMOJI_ID>
|
||||||
|
|
||||||
|
ReactionTickets: true
|
||||||
|
ReactionMessage: "React with %reaction_emoji% to create a Support Ticket!"
|
||||||
|
|
||||||
|
ReactionPanel_Description: true
|
||||||
|
ReactionDescription: "Create a support ticket to contact a member of staff."
|
||||||
|
|
||||||
|
ReactionPanel_Thumbnail: true
|
||||||
|
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||||
|
|
||||||
|
ReactionPanel_Image: true
|
||||||
|
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||||
|
|
||||||
|
# --- Creation Config ---
|
||||||
|
# --- Start ---
|
||||||
|
|
||||||
|
# Available Placeholders:
|
||||||
|
|
||||||
|
# %ticketusername% - User who created the ticket.
|
||||||
|
# <@%ticketauthor%> - Tags the user who created the ticket.
|
||||||
|
# <#%ticketid%> - Mentions the ticket channel.
|
||||||
|
|
||||||
|
|
||||||
|
Ticket_Title: "Server Support | %ticketusername%"
|
||||||
|
TicketMessage: "Hello <@%ticketauthor%>, Thank you for creating a support ticket\nPlease wait patiently whilst a member of our team reaches out to you."
|
||||||
|
|
||||||
|
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||||
|
NoTicketSubject: "No Reason Provided!"
|
||||||
|
|
||||||
|
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
|
||||||
|
|
||||||
|
AddedUser: "👍 <@%user%> has been added to this ticket"
|
||||||
|
RemovedUser: "👍 <@%user%> has been removed from this ticket"
|
||||||
|
|
||||||
|
|
||||||
|
TicketLockReaction: "🔒"
|
||||||
|
TicketDeleteReaction: "⛔"
|
||||||
|
|
||||||
|
TranscriptSavedMessage: "📝 **Transcript Saved!**"
|
||||||
|
TicketLockMessage: "❌ **Ticket Locked!**"
|
||||||
|
TicketDeleteMessage: "⚠ **Ticket Deleting!**" # Tickets deleting after 5 seconds by default.
|
||||||
|
TicketDeleteTime: 5000 # Time must be set in miliseconds.
|
||||||
|
|
||||||
|
# --- Closing Config ---
|
||||||
|
# --- Start ---
|
||||||
|
|
||||||
|
ClosingTicket: ":warning: You have requested to close your support ticket."
|
||||||
|
ClosingConfirmation_Word: "confirm"
|
||||||
|
CloseConfirmation: true
|
||||||
|
|
||||||
|
# --- Departments Config ---
|
||||||
|
# --- Start ---
|
||||||
|
|
||||||
|
TicketDepartments: true
|
||||||
|
|
||||||
|
AllowStaff: true
|
||||||
|
# If set to true users with the "Staff" role will not be able to view tickets
|
||||||
|
# without a valid department role set below.
|
||||||
|
|
||||||
|
# Set to false to allow "Staff" to see tickets whether its a department for them or not.
|
||||||
|
|
||||||
|
DepartmentEmoji_1: "🙋"
|
||||||
|
DepartmentEmoji_2: "💸"
|
||||||
|
DepartmentEmoji_3: "📗"
|
||||||
|
# Ticket emojis, the emojis are what users will need to react with inorder to proceed furthur if departments are enabled.
|
||||||
|
|
||||||
|
DepartmentTitle_1: "Support"
|
||||||
|
DepartmentTitle_2: "Billing"
|
||||||
|
DepartmentTitle_3: "Other"
|
||||||
|
# Ticket department title, This is the title for a ticket department to help users know what is available.
|
||||||
|
|
||||||
|
DepartmentRole_1: "Support"
|
||||||
|
DepartmentRole_2: "Admin"
|
||||||
|
DepartmentRole_3: "Support"
|
||||||
|
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been choosen.
|
||||||
|
|
||||||
|
# --------------------------------
|
||||||
|
# System Messages Configuration
|
||||||
|
# --------------------------------
|
||||||
|
|
||||||
|
# Available Placeholders:
|
||||||
|
# %guildname% - This displays the name of the discord server.
|
||||||
|
|
||||||
|
SystemMessages: true
|
||||||
|
SystemMessage_EmbedFooter: false
|
||||||
|
|
||||||
|
SystemMessage_Channel: "system-messages"
|
||||||
|
SystemMessage_Type: "embed"
|
||||||
|
# There are 2 types of how you can send system messages, 'normal' or 'embed'
|
||||||
|
|
||||||
|
SystemMessage_Icon: "USER"
|
||||||
|
# USER - This will display the user's icon of who joins.
|
||||||
|
# BOT - This will display the bot's icon when a someone joins.
|
||||||
|
|
||||||
|
Welcome_Title: "User Joined!"
|
||||||
|
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
|
||||||
|
# %member% define the user who joined and %guildnamne% defines the server name.
|
||||||
|
|
||||||
|
Leave_Title: "User Left!"
|
||||||
|
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
|
||||||
|
# %member% define the user who left and %guildnamne% defines the server name.
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# Links Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
LinksTitle: "Server Links"
|
||||||
|
|
||||||
|
LINKS:
|
||||||
|
"Website": "https://www.example.com"
|
||||||
|
"Store": "https://store.example.com"
|
||||||
|
"Discord": "https://discord.gg/example"
|
||||||
|
# "Twitter": "https://twitter.com/example"
|
||||||
|
# "Add More": "Just follow this format!"
|
||||||
|
|
||||||
|
# --------------------------
|
||||||
|
# Suggestion Configuration
|
||||||
|
# --------------------------
|
||||||
|
|
||||||
|
SuggestionChannel: "suggestions"
|
||||||
|
SuggestionTitle: "Suggestion"
|
||||||
|
|
||||||
|
SuggestionStarter: "What would you like to suggest?"
|
||||||
|
SuggestReact_1: 👍
|
||||||
|
SuggestReact_2: 👎
|
||||||
|
|
||||||
|
# ----------------------------
|
||||||
|
# Announcement Configuration
|
||||||
|
# ----------------------------
|
||||||
|
|
||||||
|
AnnouncementChannel: "announcements"
|
||||||
|
AnnouncementTitle: "Servername Announcement"
|
||||||
|
AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
|
||||||
|
|
||||||
|
AnnouncementStarter: "What would you like to announce?"
|
||||||
|
|
||||||
|
# --------------------------
|
||||||
|
# Moderation Configuration
|
||||||
|
# --------------------------
|
||||||
|
|
||||||
|
BanTitle: "User Banned!"
|
||||||
|
DaysBannedFor: 7
|
||||||
|
BanLogColour: "#D911B4"
|
||||||
|
|
||||||
|
KickTitle: "User Kicked!"
|
||||||
|
KickLogColour: "#D9B111"
|
||||||
|
|
||||||
|
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
|
||||||
|
ModLogChannel: "mod-logs"
|
||||||
|
|
||||||
|
PruneLogTitle: "Bulk Delete"
|
||||||
|
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
|
||||||
|
PruneColour: "#1BA30C"
|
||||||
|
|
||||||
|
BlacklistTitle: "Blacklisted User"
|
||||||
|
BlacklistColour: "#000000"
|
||||||
|
|
||||||
|
# --------------------------
|
||||||
|
# Command Configuration
|
||||||
|
# --------------------------
|
||||||
|
|
||||||
|
# --- User Commands ---
|
||||||
|
|
||||||
|
HelpCommand: "help"
|
||||||
|
LinksCommand: "links"
|
||||||
|
PingCommand: "ping"
|
||||||
|
SuggestCommand: "suggest"
|
||||||
|
|
||||||
|
# --- Ticket Commands ---
|
||||||
|
|
||||||
|
NewTicket: "ticket"
|
||||||
|
CloseTicket: "close"
|
||||||
|
AddUser: "add"
|
||||||
|
RemoveUser: "remove"
|
||||||
|
RenameTicket: "rename"
|
||||||
|
|
||||||
|
# --- Staff/Admin Commands ---
|
||||||
|
|
||||||
|
BotSay: "say"
|
||||||
|
PurgeMessage: "purge"
|
||||||
|
|
||||||
|
AnnounceCommand: "announce"
|
||||||
|
BanUser: "ban"
|
||||||
|
KickUser: "kick"
|
||||||
|
BlacklistUser: "blacklist"
|
||||||
|
|
||||||
|
# --------------------------
|
||||||
|
# Messages Configuration
|
||||||
|
# --------------------------
|
||||||
|
|
||||||
|
# --- Command Messages ---
|
||||||
|
|
||||||
|
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"
|
||||||
|
BanDesc: "Ban a member from this server."
|
||||||
|
KickDesc: "Kick a member from this server."
|
||||||
|
PurgeDesc: "Purge messages from the chat."
|
||||||
|
BlacklistDesc: "Decline a member to open a ticket"
|
||||||
|
|
||||||
|
# Error / Warning 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!"
|
||||||
+299
-557
File diff suppressed because it is too large.
Load diff
Executable → Regular
+13
-19
@@ -1,27 +1,21 @@
|
|||||||
{
|
{
|
||||||
"name": "supportbot",
|
"name": "supportbot",
|
||||||
"version": "6.1",
|
"version": "7.1",
|
||||||
"description": "SupportBot | #1 Self-Hosted Ticket Bot",
|
"description": "SupportBot, a free open-source discord ticket application with ease of use.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
|
||||||
"discord.js": "^12.5.1",
|
|
||||||
"javascript-obfuscator": "^2.9.4",
|
|
||||||
"js-yaml": "^3.14.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"node-fetch": ">=2.6.1"
|
|
||||||
},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "help"
|
"supportbot": "node index.js"
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "git+https://github.com/1tzemerald/SupportBot.git"
|
|
||||||
},
|
},
|
||||||
|
"keywords": [
|
||||||
|
"supportbot"
|
||||||
|
],
|
||||||
"author": "Emerald Services",
|
"author": "Emerald Services",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bugs": {
|
"dependencies": {
|
||||||
"url": "https://github.com/1tzemerald/SupportBot/issues"
|
"@discordjs/rest": "^0.1.0-canary.0",
|
||||||
},
|
"discord-api-types": "^0.23.1",
|
||||||
"homepage": "https://emeraldsrv.dev"
|
"discord.js": "^13.1.0",
|
||||||
|
"js-yaml": "^4.1.0",
|
||||||
|
"jsdom": "^16.7.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1 @@
|
|||||||
{
|
{}
|
||||||
"ticket": "ticket-0012",
|
|
||||||
"id":419821884431925260
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"716992597377286145": {
|
"854057237495676938": {
|
||||||
"id": 65
|
"id": 21
|
||||||
},
|
},
|
||||||
"805909541979029524": {
|
"597779408295821323": {
|
||||||
"id": 13
|
"id": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+221
-73
@@ -1,118 +1,211 @@
|
|||||||
# _________ __ __________ __
|
# ___ _ ___ _
|
||||||
# / _____/__ ________ ______ ____________/ |\______ \ _____/ |_
|
# / __> _ _ ___ ___ ___ _ _ _| |_ | . > ___ _| |_
|
||||||
# \_____ \| | \____ \\____ \ / _ \_ __ \ __\ | _// _ \ __\
|
# \__ \| | || . \| . \/ . \| '_> | | | . \/ . \ | |
|
||||||
# / \ | / |_> > |_> > <_> ) | \/| | | | ( <_> ) |
|
# <___/`___|| _/| _/\___/|_| |_| |___/\___/ |_|
|
||||||
# /_______ /____/| __/| __/ \____/|__| |__| |______ /\____/|__|
|
# |_| |_|
|
||||||
# \/ |__| |__| \/
|
|
||||||
#
|
#
|
||||||
# SupportBot version 6.1
|
# SupportBot created by Emerald Services
|
||||||
# Created by Emerald Services
|
# Installed with MIT License
|
||||||
# Installed with MIT License
|
|
||||||
#
|
#
|
||||||
# Support Server: discord.gg/jspKFcE
|
# Discord Support: https://emeraldsrv.dev/discord
|
||||||
|
|
||||||
# General Bot Configuration
|
SupportBot_Version: "7.2"
|
||||||
|
|
||||||
Token: "BOT_TOKEN_HERE"
|
# -------------------------
|
||||||
|
# General Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
Token: "BOT_TOKEN"
|
||||||
Prefix: "-"
|
Prefix: "-"
|
||||||
Bot_Name: "SupportBot"
|
Bot_Name: "SupportBot"
|
||||||
|
|
||||||
BotActivity: "-help | SupportBot"
|
DeleteMessages: true
|
||||||
|
# Should the bot delete command messages after executed?
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# Activity Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
BotActivity: "Need Help? -ticket"
|
||||||
|
|
||||||
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
StreamingURL: "https://www.twitch.tv/YOUR_TWITCH_NAME"
|
||||||
# Must set ActivityType to STREAMING in order for Streaming URL to work in the bots status.
|
# Set The ActivityType to "STREAMING" for a streaming status!
|
||||||
|
|
||||||
ActivityType: "PLAYING"
|
ActivityType: "PLAYING"
|
||||||
# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING.
|
# Activity status can either be PLAYING, WATCHING, LISTENING or STREAMING.
|
||||||
|
|
||||||
DeleteMessages: "true"
|
# -------------------------
|
||||||
|
# Embed Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
# Embed Configuration
|
EmbedColour: "#f74343"
|
||||||
|
EmbedFooter: "SupportBot | An Advanced Ticket System"
|
||||||
EmbedColour: "#04b545"
|
|
||||||
EmbedFooter: "SupportBot | The #1 Supportive Discord Bot"
|
|
||||||
|
|
||||||
ErrorColour: "#d12519"
|
ErrorColour: "#d12519"
|
||||||
SuccessColour: "#04b545"
|
SuccessColour: "#04b545"
|
||||||
WarningColour: "#fca117"
|
WarningColour: "#fca117"
|
||||||
|
|
||||||
# Role Configuration
|
# -------------------------
|
||||||
|
# Help Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
AutoRole: "true"
|
HelpMenu: true # Do not change!
|
||||||
# By setting "AutoRole to 'true' the bot will automatically apply the role below when members joins. Set to 'false' to disable this feature.
|
SendHelpPage: "channel" # Set to channel or dm
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# Role Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
AutoRole: true
|
||||||
AutoRole_Role: "Member"
|
AutoRole_Role: "Member"
|
||||||
LockdownRole: "@everyone"
|
LockdownRole: "@everyone"
|
||||||
|
|
||||||
Staff: "Staff"
|
Staff: "Server Staff"
|
||||||
Admin: "Admin"
|
Admin: "Server Admin"
|
||||||
|
TicketBlackListRole: "Blacklisted"
|
||||||
# Ticket Configuration
|
# -------------------------
|
||||||
|
# Tickets Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
TicketCategory: "Support Tickets"
|
||||||
TicketChannel: "ticket"
|
TicketChannel: "ticket"
|
||||||
TicketCategory: "Tickets"
|
|
||||||
TicketLog: "ticket-logs"
|
TicketLog: "ticket-logs"
|
||||||
TranscriptLog: "transcripts"
|
TranscriptLog: "transcripts"
|
||||||
|
|
||||||
|
TranscriptTitle: "Ticket Transcript"
|
||||||
|
TicketLog_Title: "Ticket Log"
|
||||||
|
TicketBlackListMessage: "You are not allowed to open a ticket"
|
||||||
|
|
||||||
TicketSubject: "description"
|
TicketSubject: "description"
|
||||||
# TicketSubject: "description" means that the subject (reason) of the ticket will be displayed upon the channel description if set to "embed" it will be displayed within the embed.
|
# "description" will displays the ticket reason within the channel description
|
||||||
|
# "embed" will displays the ticket reason within the ticket embed
|
||||||
|
|
||||||
AllowTicketMentions: "true"
|
AllowTicketMentions: true
|
||||||
# Set to "true" to allow the ticket to mention the author and the support team.
|
# Set to true to allow the ticket to mention the author and the support team.
|
||||||
# Set to "false" to dis-allow mentions within tickets.
|
# Set to false to dis-allow mentions within tickets.
|
||||||
|
|
||||||
|
# --- Panel Config ---
|
||||||
|
# --- Start ---
|
||||||
|
|
||||||
# Ticket Panel (Ticket Reaction Create)
|
|
||||||
|
|
||||||
ReactionTickets: "true"
|
|
||||||
ReactionMessage: "React with %reaction_emoji% to create a Support Ticket!"
|
|
||||||
ReactionChannel: "create-ticket"
|
ReactionChannel: "create-ticket"
|
||||||
ReactionEmoji: "📩"
|
ReactionEmoji: "📩"
|
||||||
# Custom Emojis: <:test:EMOJI_ID>
|
# For cusomt emojis: <:emoji_name:EMOJI_ID>
|
||||||
|
|
||||||
|
ReactionTickets: true
|
||||||
|
ReactionMessage: "React with %reaction_emoji% to create a Support Ticket!"
|
||||||
|
|
||||||
|
ReactionPanel_Description: true
|
||||||
|
ReactionDescription: "Create a support ticket to contact a member of staff."
|
||||||
|
|
||||||
|
ReactionPanel_Thumbnail: true
|
||||||
|
ReactionThumbnail: "https://hotemoji.com/images/dl/5/ticket-emoji-by-twitter.png"
|
||||||
|
|
||||||
|
ReactionPanel_Image: true
|
||||||
|
ReactionImage: "https://wallpapercave.com/wp/wp4462546.jpg"
|
||||||
|
|
||||||
|
# --- Creation Config ---
|
||||||
|
# --- Start ---
|
||||||
|
|
||||||
|
# Available Placeholders:
|
||||||
|
|
||||||
|
# %ticketusername% - User who created the ticket.
|
||||||
|
# <@%ticketauthor%> - Tags the user who created the ticket.
|
||||||
|
# <#%ticketid%> - Mentions the ticket channel.
|
||||||
|
|
||||||
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
|
||||||
Ticket_Title: "Server Support | %ticketusername%"
|
Ticket_Title: "Server Support | %ticketusername%"
|
||||||
TicketMessage: "Hello <@%ticketauthor%>, Thank you for creating a support ticket\nPlease wait patiently whilst a member of our team reaches out to you."
|
TicketMessage: "Hello <@%ticketauthor%>, Thank you for creating a support ticket\nPlease wait patiently whilst a member of our team reaches out to you."
|
||||||
|
|
||||||
|
Ticket_Thumbnail: "https://images.emojiterra.com/google/android-pie/512px/1f39f.png"
|
||||||
NoTicketSubject: "No Reason Provided!"
|
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"
|
|
||||||
|
|
||||||
AddedUser: "👍 <@%user%> has been added to this ticket"
|
AddedUser: "👍 <@%user%> has been added to this ticket"
|
||||||
RemovedUser: "👍 <@%user%> has been removed from this ticket"
|
RemovedUser: "👍 <@%user%> has been removed from this ticket"
|
||||||
|
|
||||||
ClosingTicket: ":warning: You have requested to close your support ticket."
|
|
||||||
ClosingConfirmation_Word: "confirm"
|
|
||||||
CloseConfirmation: "true"
|
|
||||||
# CloseConfirmation to true will make users confirm that they want to close a their ticket, settings to false will just close the ticket.
|
|
||||||
|
|
||||||
# Ticket Department Configuration
|
# --- Buttons Config ---
|
||||||
|
# --- Start ---
|
||||||
|
|
||||||
TicketDepartments: "true"
|
# Discord Button Colour Selection
|
||||||
# This option enable or disable the ticket departments. If set false Ticket Departments will not work
|
# PRIMARY - Blurple
|
||||||
|
# DANGER - Red
|
||||||
|
# SUCCESS - Green
|
||||||
|
# Secondary - Grey
|
||||||
|
|
||||||
AllowStaff: "true"
|
TicketLockReaction: "🔒"
|
||||||
# AllowStaff is an option to whether or not you want the users with the "Staff" role to be able to view inside tickets. If set false "Staff" will not view tickets.
|
TicketDeleteReaction: "⛔"
|
||||||
|
LockTicketCategory: "Archive"
|
||||||
|
|
||||||
DepartmentEmoji_1: "🙋"
|
TicketCloseEmoji: "❌"
|
||||||
DepartmentEmoji_2: "💸"
|
TicketDeleteEmoji: "⛔"
|
||||||
DepartmentEmoji_3: "📗"
|
TicketLockEmoji: "🔒"
|
||||||
# Ticket emojis, the emojis are what users will need to react with inorder to proceed furthur if departments are enabled.
|
|
||||||
|
TicketCloseColour: "DANGER"
|
||||||
|
TicketDeleteColour: "DANGER"
|
||||||
|
TicketLockColour: "PRIMARY"
|
||||||
|
|
||||||
|
TicketDept1Colour: "PRIMARY"
|
||||||
|
TicketDept2Colour: "PRIMARY"
|
||||||
|
TicketDept3Colour: "PRIMARY"
|
||||||
|
|
||||||
|
TicketDept1Emoji: "1️⃣"
|
||||||
|
TicketDept2Emoji: "2️⃣"
|
||||||
|
TicketDept3Emoji: "3️⃣"
|
||||||
|
|
||||||
|
TranscriptSavedMessage: "📝 **Transcript Saved!**"
|
||||||
|
TicketLockMessage: "❌ **Ticket Locked!**"
|
||||||
|
TicketDeleteMessage: "⚠ **Ticket Deleting!**" # Tickets deleting after 5 seconds by default.
|
||||||
|
TicketDeleteTime: 5000 # Time must be set in miliseconds.
|
||||||
|
|
||||||
|
# --- Departments Config ---
|
||||||
|
# --- Start ---
|
||||||
|
|
||||||
|
TicketDepartments: true
|
||||||
|
|
||||||
|
AllowStaff: true
|
||||||
|
# If set to false users with the "Staff" role will not be able to view tickets
|
||||||
|
# without a valid department role set below.
|
||||||
|
|
||||||
|
# Set to false to allow "Staff" to see tickets whether its a department for them or not.
|
||||||
|
|
||||||
DepartmentTitle_1: "Support"
|
DepartmentTitle_1: "Support"
|
||||||
DepartmentTitle_2: "Billing"
|
DepartmentTitle_2: "Billing"
|
||||||
DepartmentTitle_3: "Other"
|
DepartmentTitle_3: "Marketing"
|
||||||
# Ticket department title, This is the title for a ticket department to help users know what is available.
|
# Ticket department title, This is the title for a ticket department to help users know what is available.
|
||||||
|
|
||||||
DepartmentRole_1: "Support"
|
DepartmentRole_1: "Support Team"
|
||||||
DepartmentRole_2: "Admin"
|
DepartmentRole_2: "Billing Team"
|
||||||
DepartmentRole_3: "Support"
|
DepartmentRole_3: "Marketing Team"
|
||||||
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been choosen.
|
# Ticket roles are the roles that will be able to gain access to tickets depending on what department has been choosen.
|
||||||
|
|
||||||
# System Message Configuration
|
# --- Closing Config ---
|
||||||
|
# --- Start ---
|
||||||
|
|
||||||
SystemMessages: "true"
|
ClosingTicket: ":warning: You have requested to close your support ticket."
|
||||||
|
ClosingConfirmation_Word: "confirm"
|
||||||
|
CloseConfirmation: false
|
||||||
|
|
||||||
|
# --------------------------------
|
||||||
|
# System Messages Configuration
|
||||||
|
# --------------------------------
|
||||||
|
|
||||||
|
# Available Placeholders:
|
||||||
|
# %guildname% - This displays the name of the discord server.
|
||||||
|
|
||||||
|
SystemMessages: true
|
||||||
|
SystemMessage_EmbedFooter: false
|
||||||
|
|
||||||
SystemMessage_Channel: "system-messages"
|
SystemMessage_Channel: "system-messages"
|
||||||
SystemMessage_Type: "embed"
|
SystemMessage_Type: "embed"
|
||||||
# There are 2 types of how you can send system messages, 'normal' or 'embed'
|
# There are 2 types of how you can send system messages, 'normal' or 'embed'
|
||||||
|
|
||||||
SystemMessage_Icon: "USER"
|
SystemMessage_Icon: "USER"
|
||||||
|
# USER - This will display the user's icon of who joins.
|
||||||
|
# BOT - This will display the bot's icon when a someone joins.
|
||||||
|
# CUSTOM - This will allow you to use a custom image, set this below!
|
||||||
|
SystemMessageIcon_URL: "https://imgur.com/example.png"
|
||||||
|
|
||||||
Welcome_Title: "User Joined!"
|
Welcome_Title: "User Joined!"
|
||||||
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
|
WelcomeMessage: "Hello %member%, Welcome to %guildname%!"
|
||||||
@@ -122,27 +215,39 @@ Leave_Title: "User Left!"
|
|||||||
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
|
LeaveMessage: "Goodbye %member%, Thank you for visting %guildname%!"
|
||||||
# %member% define the user who left and %guildnamne% defines the server name.
|
# %member% define the user who left and %guildnamne% defines the server name.
|
||||||
|
|
||||||
SystemMessage_EmbedFooter: "false"
|
# -------------------------
|
||||||
|
# Links Configuration
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
# LINKS Configuration
|
LinksTitle: "Server Links"
|
||||||
|
|
||||||
LinksTitle: "Quick Links"
|
|
||||||
|
|
||||||
LINKS:
|
LINKS:
|
||||||
"Website": "https://www.example.com"
|
"Website": "https://www.example.com"
|
||||||
"Store": "https://store.example.com"
|
"Store": "https://store.example.com"
|
||||||
"Discord": "https://discord.gg/example"
|
"Discord": "https://discord.gg/example"
|
||||||
# "Twitter": "https://twitter.com/example"
|
# "Twitter": "https://twitter.com/example"
|
||||||
|
# "Add More": "Just follow this format!"
|
||||||
|
|
||||||
# Suggestions Configuration
|
# --------------------------
|
||||||
|
# Suggestion Configuration
|
||||||
|
# --------------------------
|
||||||
|
|
||||||
SuggestionChannel: "suggestions"
|
SuggestionChannel: "suggestions"
|
||||||
SuggestionTitle: "Suggestion"
|
SuggestionTitle: "Suggestion"
|
||||||
|
|
||||||
SuggestionStarter: "What would you like to suggest?"
|
SuggestionStarter: "What would you like to suggest?"
|
||||||
SuggestReact_1: 👍
|
SuggestReact_1: 👍
|
||||||
SuggestReact_2: 👎
|
SuggestReact_2: 👎
|
||||||
|
|
||||||
# Announcement Configuration
|
SuggestionMessage_Icon: "USER"
|
||||||
|
# USER - This will display the user's icon of who joins.
|
||||||
|
# BOT - This will display the bot's icon when a someone joins.
|
||||||
|
# CUSTOM - This will allow you to use a custom image, set this below!
|
||||||
|
SuggestionIcon_URL: "https://imgur.com/example.png"
|
||||||
|
|
||||||
|
# ----------------------------
|
||||||
|
# Announcement Configuration
|
||||||
|
# ----------------------------
|
||||||
|
|
||||||
AnnouncementChannel: "announcements"
|
AnnouncementChannel: "announcements"
|
||||||
AnnouncementTitle: "Servername Announcement"
|
AnnouncementTitle: "Servername Announcement"
|
||||||
@@ -150,14 +255,45 @@ AnnouncementIcon: "https://i.imgur.com/HbkZyB7.png"
|
|||||||
|
|
||||||
AnnouncementStarter: "What would you like to announce?"
|
AnnouncementStarter: "What would you like to announce?"
|
||||||
|
|
||||||
# General Command Configuration
|
# --------------------------
|
||||||
|
# Moderation Configuration
|
||||||
|
# --------------------------
|
||||||
|
|
||||||
|
ChatLog_Title: "Chat Log"
|
||||||
|
ChatLogChannel: "chat-logs"
|
||||||
|
ChatLogColour: "#1BA30C"
|
||||||
|
ChatLog_Thumbnail: "https://cdn.iconscout.com/icon/free/png-256/chat-2639493-2187526.png"
|
||||||
|
ChatLogSavedMessage: "📝 **Channel Transcript Saved!**"
|
||||||
|
|
||||||
|
BanTitle: "User Banned!"
|
||||||
|
DaysBannedFor: 7
|
||||||
|
BanLogColour: "#D911B4"
|
||||||
|
|
||||||
|
KickTitle: "User Kicked!"
|
||||||
|
KickLogColour: "#D9B111"
|
||||||
|
|
||||||
|
ModThumbnail: "https://i.imgur.com/l6P3DF6.png"
|
||||||
|
ModLogChannel: "mod-logs"
|
||||||
|
|
||||||
|
PruneLogTitle: "Bulk Delete"
|
||||||
|
PruneThumbnail: "https://i.imgur.com/OAgW2vR.png"
|
||||||
|
PruneColour: "#1BA30C"
|
||||||
|
|
||||||
|
BlacklistTitle: "Blacklisted User"
|
||||||
|
BlacklistColour: "#000000"
|
||||||
|
|
||||||
|
# --------------------------
|
||||||
|
# Command Configuration
|
||||||
|
# --------------------------
|
||||||
|
|
||||||
|
# --- User Commands ---
|
||||||
|
|
||||||
HelpCommand: "help"
|
HelpCommand: "help"
|
||||||
LinksCommand: "links"
|
LinksCommand: "links"
|
||||||
PingCommand: "ping"
|
PingCommand: "ping"
|
||||||
SuggestCommand: "suggest"
|
SuggestCommand: "suggest"
|
||||||
|
|
||||||
# Support Command Configuration
|
# --- Ticket Commands ---
|
||||||
|
|
||||||
NewTicket: "ticket"
|
NewTicket: "ticket"
|
||||||
CloseTicket: "close"
|
CloseTicket: "close"
|
||||||
@@ -165,16 +301,25 @@ AddUser: "add"
|
|||||||
RemoveUser: "remove"
|
RemoveUser: "remove"
|
||||||
RenameTicket: "rename"
|
RenameTicket: "rename"
|
||||||
|
|
||||||
# Staff Command Configuration
|
# --- Staff/Admin Commands ---
|
||||||
|
|
||||||
|
ChatLog: "transcript"
|
||||||
BotSay: "say"
|
BotSay: "say"
|
||||||
|
PurgeMessage: "purge"
|
||||||
# Admin Command Configuration
|
|
||||||
|
|
||||||
AnnounceCommand: "announce"
|
AnnounceCommand: "announce"
|
||||||
|
BanUser: "ban"
|
||||||
|
KickUser: "kick"
|
||||||
|
BlacklistUser: "blacklist"
|
||||||
|
|
||||||
# Commmand Descriptions
|
# --------------------------
|
||||||
|
# Messages Configuration
|
||||||
|
# --------------------------
|
||||||
|
|
||||||
|
# --- Command Messages ---
|
||||||
|
|
||||||
|
BotSayDesc: "Say something with the bot"
|
||||||
|
ChatLogDesc: "Get a transcript of a channel"
|
||||||
NewTicketDesc: "Create a new support ticket"
|
NewTicketDesc: "Create a new support ticket"
|
||||||
AnnounceDesc: "Create a server announcement"
|
AnnounceDesc: "Create a server announcement"
|
||||||
CloseTicketDesc: "Close your support ticket"
|
CloseTicketDesc: "Close your support ticket"
|
||||||
@@ -184,12 +329,15 @@ HelpDesc: "Get a list of all the commands"
|
|||||||
RemoveUserDesc: "Remove a user from a support ticket"
|
RemoveUserDesc: "Remove a user from a support ticket"
|
||||||
AddUserDesc: "Add a user to a support ticket"
|
AddUserDesc: "Add a user to a support ticket"
|
||||||
SuggestionDesc: "Create a server suggestion"
|
SuggestionDesc: "Create a server suggestion"
|
||||||
BotSayDesc: "Say something with the bot"
|
BanDesc: "Ban a member from this server."
|
||||||
|
KickDesc: "Kick a member from this server."
|
||||||
|
PurgeDesc: "Purge messages from the chat."
|
||||||
|
BlacklistDesc: "Decline a member to open a ticket"
|
||||||
|
|
||||||
# Error / Warining Messages
|
# Error / Warning Messages
|
||||||
|
|
||||||
IncorrectPerms: ":x: **Err!** You do not have the correct permissions to use this command."
|
IncorrectPerms: ":x: **Err!** You do not have the correct permissions to use this command."
|
||||||
InvalidChannel: ":x: **Err!** Channel not found. Please create it!"
|
InvalidChannel: ":x: **Err!** Channel not found. Please create it!"
|
||||||
UserNotFound: ":x: **Err!** This user doesn't exist, Are they in this server?"
|
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."
|
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!"
|
TicketExists: ":warning: This ticket cannot be opened, It already exists!"
|
||||||
Reference in new issue
Block a user