Compare commits
37
Commits
SupportBot
..
4.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8302cd276 | ||
|
|
35d8d77f15 | ||
|
|
f853394d9d | ||
|
|
500c01dd1f | ||
|
|
71bfccfb0c | ||
|
|
71e1b64818 | ||
|
|
2118a00a36 | ||
|
|
1c69c21f21 | ||
|
|
31c76fc1c0 | ||
|
|
d31cdf8af2 | ||
|
|
29b5fd2c6f | ||
|
|
aa32525f8c | ||
|
|
f6a67a3373 | ||
|
|
4f78858641 | ||
|
|
c7e70bdaf8 | ||
|
|
5479e0957b | ||
|
|
8500554cfb | ||
|
|
368727cece | ||
|
|
742faf3805 | ||
|
|
7d08cbed84 | ||
|
|
f413bb5f3c | ||
|
|
2b3edc7b45 | ||
|
|
83f982f8d2 | ||
|
|
890a1d41b1 | ||
|
|
996a2c26ca | ||
|
|
fadf042101 | ||
|
|
a819078d7f | ||
|
|
2c9b4c663d | ||
|
|
22e6803e14 | ||
|
|
61cecb112f | ||
|
|
0c18aff34d | ||
|
|
599649a97f | ||
|
|
45194b82da | ||
|
|
570d0985d3 | ||
|
|
5eae625b28 | ||
|
|
fcc5460ff2 | ||
|
|
07d45e50de |
No files matched your search
@@ -1,4 +1,4 @@
|
|||||||
<h1 align="center">SupportBot v3.4</h1>
|
<h1 align="center">SupportBot v4.0.0</h1>
|
||||||
<h4 align="center">A Self Hosted discord application</h4>
|
<h4 align="center">A Self Hosted discord application</h4>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@@ -6,17 +6,19 @@
|
|||||||
<img src="https://discordapp.com/api/guilds/516345301985132552/widget.png?style=shield" alt="Discord Server">
|
<img src="https://discordapp.com/api/guilds/516345301985132552/widget.png?style=shield" alt="Discord Server">
|
||||||
</a>
|
</a>
|
||||||
<img src="https://img.shields.io/badge/Made%20with-NodeJS-blue.svg" alt="Made with NodeJS">
|
<img src="https://img.shields.io/badge/Made%20with-NodeJS-blue.svg" alt="Made with NodeJS">
|
||||||
|
<img src="https://img.shields.io/github/release/EmeraldRusher/SupportBot.svg" alt="GitHub release">
|
||||||
|
<img src="https://img.shields.io/github/package-json/dependency-version/EmeraldRusher/SupportBot/discord.js.svg" alt="GitHub package.json dependency version (prod)">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
SupportBot is a free & open source discord bot for your server that has the capability to control & manage your servers support.
|
SupportBot is a free & open source discord bot for your server that has the capability to control & manage your servers support.
|
||||||
|
|
||||||
| Version | Supported | Type |
|
| Version | Supported | Status |
|
||||||
| ------- | ------------------ |--------------------|
|
| ------- | ------------------ |--------------------|
|
||||||
| 1.0.x | ❌ | None |
|
| 1.x | 🚫 | Discontinued |
|
||||||
| 2.0.x | ⚠ | Community |
|
| 2.x | 🚫 | Discontinued |
|
||||||
| 3.0.x | ✅ | Priority |
|
| 3.x | ✔️ | Supported |
|
||||||
| 4.0.x | ❌ | N/A |
|
| 4.x | ✔️ | Supported |
|
||||||
| Premium | ❌ | N/A |
|
| Premium | ❌ | Not released yet |
|
||||||
|
|
||||||
# Getting Started
|
# Getting Started
|
||||||
Firstly you will need to download the resource, Once you have downloaded the resource open a new tab in your browser and go to https://discordapp.com/developers/applications/. Create a new application and then open your app and select bot and then create your bot. Copy the bot token and paste it where it says ``"token": "BOT TOKEN HERE",`` in the ``settings.json`` file.
|
Firstly you will need to download the resource, Once you have downloaded the resource open a new tab in your browser and go to https://discordapp.com/developers/applications/. Create a new application and then open your app and select bot and then create your bot. Copy the bot token and paste it where it says ``"token": "BOT TOKEN HERE",`` in the ``settings.json`` file.
|
||||||
@@ -24,71 +26,104 @@ Firstly you will need to download the resource, Once you have downloaded the res
|
|||||||
# Invite the bot
|
# Invite the bot
|
||||||
Head back to discord developers portal where your application is and head into the ``OAuth`` tab and select bot and then below select ``Administrator`` then copy the link and paste into your browser and it should as your to invite the bot to a server.
|
Head back to discord developers portal where your application is and head into the ``OAuth`` tab and select bot and then below select ``Administrator`` then copy the link and paste into your browser and it should as your to invite the bot to a server.
|
||||||
|
|
||||||
|
# Help
|
||||||
|
If you don't understand something, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [Emerald Services Server](https://discord.gg/u47MQJ).
|
||||||
|
|
||||||
# Configurating SupportBot
|
# Configurating SupportBot
|
||||||
Once you have setup your discord application such as invited the bot and added your bot token to the ``settings.json`` we can begin configurating your bot. Firstly open up the ``settings.json`` file and you will see loads of different things to config. You will see the following below:
|
Once you have setup your discord application such as invited the bot and added your bot token to the ``settings.json`` we can begin configurating your bot. Firstly open up the ``settings.json`` file and you will see loads of different things to config. You will see the following below:
|
||||||
|
|
||||||
```
|
```
|
||||||
"prefix": "!",
|
{
|
||||||
"botname": "SupportBot",
|
"SupportBot": "v4.0.0",
|
||||||
"colour": "#42f477",
|
|
||||||
"footer": "Support Bot, By Emerald",
|
"token": "BOT_TOKEN_HERE",
|
||||||
|
"prefix": "!",
|
||||||
|
"botname": "SupportBot",
|
||||||
|
"colour": "#13bd2a",
|
||||||
|
"footer": "Support Bot, By Emerald Services",
|
||||||
|
|
||||||
|
"BotStatus": "Support Bot",
|
||||||
|
|
||||||
|
"staff": "Staff",
|
||||||
|
"support": "Support",
|
||||||
|
"everyone": "@everyone",
|
||||||
|
"Auto_Role": "Member",
|
||||||
|
|
||||||
|
"LINKS": {
|
||||||
|
"Discord": "https://discord.gg/",
|
||||||
|
"Twitter": "https://twitter.com/",
|
||||||
|
"Website": "https://example.com/",
|
||||||
|
"AddMore": "AddMoreIfYouWant"
|
||||||
|
},
|
||||||
|
|
||||||
|
"LINKS_TITLE": "SupportBot Links",
|
||||||
|
|
||||||
"BotStatus": "Support Bot",.
|
"category": "Tickets",
|
||||||
|
"Ticket_Message": "Your support ticket has been opened successfully\nPlease allow us some time to reach out to you.",
|
||||||
|
"Ticket_Logs": "ticket-logs",
|
||||||
|
"bot.settings.Default_Ticket_Reason": "No Subject",
|
||||||
|
"Ticket_React_Message": ":mailbox: React to create your support ticket.",
|
||||||
|
|
||||||
|
"Commands_Log_Title": "SupportBot Logs",
|
||||||
|
"Command_Log_Channel": "command-logs",
|
||||||
|
|
||||||
"staff": "Staff",
|
"Announcement_Title": "SupportBot Announcement",
|
||||||
"support": "Support Team",
|
"Announcement_Channel": "announcements",
|
||||||
"everyone": "@everyone",
|
"Announcement_Tag_Role": "@everyone",
|
||||||
|
|
||||||
|
"Welcome_Message": "Welcome to the server!",
|
||||||
|
"Welcome_Channel": "welcome",
|
||||||
|
|
||||||
|
"Leave_Message": "Thank you for visiting us!",
|
||||||
|
"Leave_Channel": "welcome",
|
||||||
|
|
||||||
"category": "Tickets",
|
"Poll_Channel": "polls",
|
||||||
"Ticket_Message": "Your support ticket has been opened successfully\nPlease allow us some time to reach out to you.",
|
"Poll_Title": "📊 Polls",
|
||||||
"Ticket_Logs": "ticket-logs",
|
"Reaction_Poll_1": "✅",
|
||||||
|
"Reaction_Poll_2": "❎",
|
||||||
|
|
||||||
|
"Suggestion_Title": "SupportBot Suggestions",
|
||||||
|
"Suggestion_Channel": "suggestions",
|
||||||
|
"suggestyes": "✅",
|
||||||
|
"suggestno": "❎",
|
||||||
|
|
||||||
|
"Report_Channel": "reports",
|
||||||
|
"Report_Title": "SupportBot Report",
|
||||||
|
|
||||||
|
|
||||||
"Announcement_Title": "SupportBot Announcement",
|
"Announcement_Command": "announce",
|
||||||
"Announcement_Channel": "announcements",
|
"Say_Command": "say",
|
||||||
|
"Suggest_Command": "suggest",
|
||||||
|
"Ping_Command": "ping",
|
||||||
|
"Ticket_Command": "ticket",
|
||||||
|
"Remove_Command": "remove",
|
||||||
|
"Add_Command": "add",
|
||||||
|
"Close_Command": "close",
|
||||||
|
"Forceclose_Command": "forceclose",
|
||||||
|
"Rename_Command": "rename",
|
||||||
|
"Help_Command": "help",
|
||||||
|
"Link_Command": "links",
|
||||||
|
"Lockchat_Command": "lock",
|
||||||
|
"UnLockchat_Command": "unlock",
|
||||||
|
"Poll_Command": "poll",
|
||||||
|
"Report_Command": "report"
|
||||||
|
}
|
||||||
|
|
||||||
"Welcome_Message": "Welcome to the server!",
|
|
||||||
"Welcome_Channel": "welcome",
|
|
||||||
|
|
||||||
"Leave_Message": "Thank you for visiting us!",
|
|
||||||
"Leave_Channel": "welcome",
|
|
||||||
|
|
||||||
"Poll_Channel": "polls",
|
|
||||||
"Poll_Title": "📊 Polls",
|
|
||||||
"Reaction_Poll_1": "✅",
|
|
||||||
"Reaction_Poll_2": "❎",
|
|
||||||
|
|
||||||
"Suggestion_Title": "SupportBot Suggestions",
|
|
||||||
"Suggestion_Channel": "suggestions",
|
|
||||||
"suggestyes": "✅",
|
|
||||||
"suggestno": "❎",
|
|
||||||
|
|
||||||
"LINK_1_NAME": "Discord",
|
|
||||||
"LINK_2_NAME": "Twitter",
|
|
||||||
"LINK_3_NAME": "Website",
|
|
||||||
|
|
||||||
"LINK_1": "https://dicord.gg/changemeinconfig",
|
|
||||||
"LINK_2": "https://twitter.com/changemeinconfig",
|
|
||||||
"LINK_3": "https://www.example.com/",
|
|
||||||
|
|
||||||
"LINKS_TITLE": "SupportBot Links",
|
|
||||||
|
|
||||||
"Ticket_Command": "ticket",
|
|
||||||
"Suggest_Command": "suggest",
|
|
||||||
"Say_Command": "say",
|
|
||||||
"Remove_Command": "remove",
|
|
||||||
"Add_Command": "add",
|
|
||||||
"Ping_Command": "ping",
|
|
||||||
"Close_Command": "close",
|
|
||||||
"Forceclose_Command": "forceclose",
|
|
||||||
"Rename_Command": "rename",
|
|
||||||
"Help_Command": "help",
|
|
||||||
"Link_Command": "links",
|
|
||||||
"Lockchat_Command": "lock",
|
|
||||||
"UnLockchat_Command": "unlock",
|
|
||||||
"Poll_Command": "poll"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Contributors List
|
# Contributors List
|
||||||
|
<p>
|
||||||
|
<a href="https://github.com/iJosGCS">
|
||||||
|
<img src="https://cdn.discordapp.com/avatars/199237487648833556/cdd7d976b75698b19e3c6b64e1dcdceb.png?size=32" alt="iJosGCS Profile">
|
||||||
|
<strong>@iJosGCS</strong>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<a href="https://github.com/RedstoneGamez">
|
||||||
|
<img src="https://cdn.discordapp.com/avatars/282610987801247744/9567e0674a5a6d371bb5d6efb956d57b.png?size=32" alt="RedstoneGamez Profile">
|
||||||
|
<strong>@RedstoneGamez</strong>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
# Donators List
|
# Donators List
|
||||||
|
|
||||||
@@ -53,6 +53,21 @@ const useradded = new Discord.RichEmbed()
|
|||||||
message.channel.send({embed: useradded});
|
message.channel.send({embed: useradded});
|
||||||
console.log(`\x1b[36m`, `${message.author} has successfully added ${rUser} to ${message.channel}`)
|
console.log(`\x1b[36m`, `${message.author} has successfully added ${rUser} to ${message.channel}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Add_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
// SupportBot
|
||||||
|
// Command: Say
|
||||||
|
|
||||||
|
const Discord = require("discord.js");
|
||||||
|
const bot = new Discord.Client()
|
||||||
|
|
||||||
|
bot.settings = require("../settings.json");
|
||||||
|
|
||||||
|
exports.run = (bot, message, args) => {
|
||||||
|
message.delete();
|
||||||
|
|
||||||
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
||||||
|
|
||||||
|
const rolemissing = new Discord.RichEmbed()
|
||||||
|
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
if (!staffGroup) return message.reply(rolemissing).catch(err=>{console.error(err)})
|
||||||
|
|
||||||
|
const donothaverole = new Discord.RichEmbed()
|
||||||
|
.setDescription(`:x: Sorry! You cannot use this command with the role **${bot.settings.staff}**`)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
||||||
|
|
||||||
|
const embed = new Discord.RichEmbed()
|
||||||
|
.setTitle(`${bot.settings.Announcement_Title}`)
|
||||||
|
.setDescription(args.join(" "))
|
||||||
|
.setTimestamp()
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL)
|
||||||
|
|
||||||
|
let ac = message.guild.channels.find(AnnounceChannel => AnnounceChannel.name === `${bot.settings.Announcement_Channel}`)
|
||||||
|
if(!ac) return message.channel.send(`:x: Error! Could not find the logs channel **${bot.settings.Announcement_Channel}**`)
|
||||||
|
|
||||||
|
ac.send(embed)
|
||||||
|
ac.send(`${bot.settings.Annuoncement_Tag_Role}`)
|
||||||
|
|
||||||
|
const SuggestionSuccessEmbed = new Discord.RichEmbed()
|
||||||
|
.setDescription(`:white_check_mark: You have successfully created an announcement. <#${ac.id}>`)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
message.channel.send(SuggestionSuccessEmbed);
|
||||||
|
|
||||||
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Announcement_Command}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Announcement_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.help = {
|
||||||
|
name: bot.settings.Announcement_Command,
|
||||||
|
}
|
||||||
@@ -36,6 +36,21 @@ message.channel.send({embed: close1}).then(m => {
|
|||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Close_Command}`)
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Close_Command}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Close_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
|
|||||||
@@ -29,6 +29,20 @@ message.channel.delete();
|
|||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Forceclose_Command}`)
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Forceclose_Command}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Forceclose_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
|
|||||||
+20
-5
@@ -12,18 +12,19 @@ exports.run = (bot, message, args) => {
|
|||||||
let userCommands = "";
|
let userCommands = "";
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Link_Command}**: Get some important links!\n`;
|
userCommands += `**${bot.settings.prefix}${bot.settings.Link_Command}**: Get some important links!\n`;
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Ping_Command}**: Check the bots ping. Pong!\n`;
|
userCommands += `**${bot.settings.prefix}${bot.settings.Ping_Command}**: Check the bots ping. Pong!\n`;
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Ticket_Command} <reason>**: Create a support ticket\n`;
|
userCommands += `**${bot.settings.prefix}${bot.settings.Ticket_Command} <reason>**: Create a support ticket\n`;
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Close_Command}**: Close your support ticket\n`;
|
userCommands += `**${bot.settings.prefix}${bot.settings.Close_Command}**: Close your support ticket\n`;
|
||||||
userCommands += `**${bot.settings.prefix}${bot.settings.Suggest_Command} <suggestion>**: Create a server suggestion\n`;
|
userCommands += `**${bot.settings.prefix}${bot.settings.Suggest_Command} <suggestion>**: Create a server suggestion\n`;
|
||||||
|
|
||||||
let supportCommands = "";
|
let supportCommands = "";
|
||||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Add_Command} <user>**: Adds a user to a ticket\n`;
|
supportCommands += `**${bot.settings.prefix}${bot.settings.Add_Command} <user>**: Adds a user to a ticket\n`;
|
||||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Remove_Command} <user>**: Removes a user from a ticket\n`;
|
supportCommands += `**${bot.settings.prefix}${bot.settings.Remove_Command} <user>**: Removes a user from a ticket\n`;
|
||||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Forceclose_Command}**: Forceclose a support ticket\n`;
|
supportCommands += `**${bot.settings.prefix}${bot.settings.Forceclose_Command}**: Forceclose a support ticket\n`;
|
||||||
supportCommands += `**${bot.settings.prefix}${bot.settings.Rename_Command}**: Rename a support ticket\n`;
|
supportCommands += `**${bot.settings.prefix}${bot.settings.Rename_Command}**: Rename a support ticket\n`;
|
||||||
|
|
||||||
let staffCommands = "";
|
let staffCommands = "";
|
||||||
staffCommands += `**${bot.settings.prefix}${bot.settings.Say_Command} <message>**: Create a bot announcement\n`;
|
staffCommands += `**${bot.settings.prefix}${bot.settings.Announcement_Command} <message>**: Create a bot announcement\n`;
|
||||||
|
staffCommands += `**${bot.settings.prefix}${bot.settings.Say_Command} <message>**: Send a message as the bot\n`;
|
||||||
staffCommands += `**${bot.settings.prefix}${bot.settings.Lockchat_Command}**: Lock the chat channel\n`;
|
staffCommands += `**${bot.settings.prefix}${bot.settings.Lockchat_Command}**: Lock the chat channel\n`;
|
||||||
staffCommands += `**${bot.settings.prefix}${bot.settings.UnLockchat_Command}**: UnLock the chat channel\n`;
|
staffCommands += `**${bot.settings.prefix}${bot.settings.UnLockchat_Command}**: UnLock the chat channel\n`;
|
||||||
|
|
||||||
@@ -39,8 +40,22 @@ exports.run = (bot, message, args) => {
|
|||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Help_Command}`)
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Help_Command}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Help_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via settings.json`);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Help_Command,
|
name: bot.settings.Help_Command,
|
||||||
}
|
}
|
||||||
+30
-12
@@ -1,27 +1,45 @@
|
|||||||
// SupportBot
|
// SupportBot
|
||||||
// Command: Help
|
// Command: Help
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require( "discord.js" );
|
||||||
const bot = new Discord.Client()
|
const bot = new Discord.Client()
|
||||||
|
|
||||||
bot.settings = require("../settings.json");
|
bot.settings = require( "../settings.json" );
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
exports.run = ( bot, message, args ) => {
|
||||||
message.delete();
|
message.delete();
|
||||||
|
|
||||||
let BotLinks = "";
|
let botLinks = bot.settings.LINKS;
|
||||||
BotLinks += `[${bot.settings.LINK_1_NAME}](${bot.settings.LINK_1})\n`;
|
|
||||||
BotLinks += `[${bot.settings.LINK_2_NAME}](${bot.settings.LINK_2})\n`;
|
|
||||||
BotLinks += `[${bot.settings.LINK_3_NAME}](${bot.settings.LINK_3})\n`;
|
|
||||||
|
|
||||||
const links = new Discord.RichEmbed()
|
let links = '';
|
||||||
.setTitle(`${bot.settings.LINKS_TITLE}`)
|
|
||||||
.setDescription(BotLinks)
|
for ( let name in botLinks ) {
|
||||||
|
links += `[${name}](${botLinks[ name ]})\n`;
|
||||||
|
}
|
||||||
|
|
||||||
|
let embed = new Discord.RichEmbed()
|
||||||
|
.setTitle( bot.settings.LINKS_TITLE )
|
||||||
|
.setDescription( links )
|
||||||
|
.setColor( bot.settings.colour )
|
||||||
|
.setFooter( bot.settings.footer )
|
||||||
|
|
||||||
|
message.channel.send( embed );
|
||||||
|
|
||||||
|
console.log( `\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Link_Command}` )
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Link_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(bot.settings.colour)
|
||||||
.setFooter(bot.settings.footer)
|
.setFooter(bot.settings.footer)
|
||||||
message.channel.send(links)
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Link_Command}`)
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,20 @@ exports.run = async(bot, message, args) => {
|
|||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Lockchat_Command}`)
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Lockchat_Command}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Lockchat_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
|
|||||||
@@ -16,6 +16,20 @@ exports.run = (bot, message, args) => {
|
|||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Ping_Command}`)
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Ping_Command}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Ping_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
|
|||||||
@@ -39,6 +39,20 @@ exports.run = (bot, message, args) => {
|
|||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Poll_Command}`)
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Poll_Command}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Close_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
|
|||||||
@@ -53,6 +53,20 @@ const useradded = new Discord.RichEmbed()
|
|||||||
message.channel.send({embed: useradded});
|
message.channel.send({embed: useradded});
|
||||||
console.log(`\x1b[36m`, `${message.author} has successfully removed ${rUser} from ${message.channel}`)
|
console.log(`\x1b[36m`, `${message.author} has successfully removed ${rUser} from ${message.channel}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Remove_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
|
|||||||
@@ -42,6 +42,20 @@ exports.run = (bot, message, args) => {
|
|||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Rename_Command}`)
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Rename_Command}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Rename_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
|
|||||||
@@ -48,6 +48,21 @@ exports.run = (bot, message, args) => {
|
|||||||
} else {
|
} else {
|
||||||
rc.send(embed);
|
rc.send(embed);
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Report_Command}`);
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Report_Command}`);
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Report_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-6
@@ -26,15 +26,25 @@ exports.run = (bot, message, args) => {
|
|||||||
.setDescription(args.join(" "))
|
.setDescription(args.join(" "))
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setColor(bot.settings.colour)
|
.setColor(bot.settings.colour)
|
||||||
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL)
|
.setFooter(`${message.author.username}#${message.author.discriminator}`, message.author.displayAvatarURL)
|
||||||
|
|
||||||
let ac = message.guild.channels.find(AnnounceChannel => AnnounceChannel.name === `${bot.settings.Announcement_Channel}`)
|
message.channel.send(embed);
|
||||||
if(!ac) return message.channel.send(`:x: Error! Could not find the logs channel **${bot.settings.Announcement_Channel}**`)
|
|
||||||
|
|
||||||
ac.send(embed)
|
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Say_Command}`)
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Say_Command}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Say_Command, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
|
|||||||
+25
-5
@@ -11,10 +11,11 @@ exports.run = async(bot, message, args) => {
|
|||||||
|
|
||||||
const SuggestionEmbed = new Discord.RichEmbed()
|
const SuggestionEmbed = new Discord.RichEmbed()
|
||||||
.setTitle(`${bot.settings.Suggestion_Title}`)
|
.setTitle(`${bot.settings.Suggestion_Title}`)
|
||||||
.setDescription(args.join(" "))
|
.setDescription(`\`\`\`${args.join(" ")}\`\`\`\nFrom <@${message.author.id}>`)
|
||||||
.setFooter(`Suggestion by ${message.author.username}`, message.author.displayAvatarURL)
|
.setFooter(`${bot.settings.footer}`, message.author.avatarURL)
|
||||||
.setColor(bot.settings.colour)
|
.setTimestamp(new Date())
|
||||||
|
.setColor(bot.settings.colour);
|
||||||
|
|
||||||
let sc = message.guild.channels.find(SuggestionChannel => SuggestionChannel.name === `${bot.settings.Suggestion_Channel}`);
|
let sc = message.guild.channels.find(SuggestionChannel => SuggestionChannel.name === `${bot.settings.Suggestion_Channel}`);
|
||||||
if(!sc) return message.channel.send(`:x: Error! Could not find the suggestion channel **${bot.settings.Suggestion_Channel}**`);
|
if(!sc) return message.channel.send(`:x: Error! Could not find the suggestion channel **${bot.settings.Suggestion_Channel}**`);
|
||||||
|
|
||||||
@@ -24,10 +25,29 @@ exports.run = async(bot, message, args) => {
|
|||||||
msg.react(bot.settings.suggestyes).then(() => msg.react(bot.settings.suggestno));
|
msg.react(bot.settings.suggestyes).then(() => msg.react(bot.settings.suggestno));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const SuggestionSuccessEmbed = new Discord.RichEmbed()
|
||||||
|
.setDescription(`:white_check_mark: You have successfully created your suggestion. <#${sc.id}>`)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
message.channel.send(SuggestionSuccessEmbed);
|
||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Suggest_Command}`)
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Suggest_Command}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Suggest_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**`);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Suggest_Command,
|
name: bot.settings.Suggest_Command,
|
||||||
}
|
}
|
||||||
+54
-5
@@ -6,18 +6,47 @@ const bot = new Discord.Client()
|
|||||||
|
|
||||||
bot.settings = require("../settings.json");
|
bot.settings = require("../settings.json");
|
||||||
|
|
||||||
exports.run = async(bot, message, args) => {
|
exports.run = (bot, message, args) => {
|
||||||
message.delete();
|
message.delete();
|
||||||
|
|
||||||
const ID = Math.floor(Math.random() * 10) + 2000;
|
const ID = Math.floor(Math.random() * 10) + 2000;
|
||||||
const subject = args.join(" ") || "No Subject.";
|
const subject = args.join(" ") || `${bot.settings.Default_Ticket_Reason}`;
|
||||||
|
|
||||||
|
// Ticket Reactions
|
||||||
|
const reactembed = new Discord.RichEmbed()
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setDescription(`${bot.settings.Ticket_React_Message}`);
|
||||||
|
message.channel.send(reactembed)
|
||||||
|
.then(function(msg) {
|
||||||
|
|
||||||
|
msg.react('✅').then(() => msg.react('❎'));
|
||||||
|
|
||||||
|
const filter = (reaction, user) => {
|
||||||
|
return ['✅', '❎'].includes(reaction.emoji.name) && user.id !== msg.author.id;
|
||||||
|
};
|
||||||
|
|
||||||
|
msg.awaitReactions(filter, { max: 1, time: 60000, errors: ['time'] })
|
||||||
|
.then(collected => {
|
||||||
|
const reaction = collected.first();
|
||||||
|
|
||||||
|
if (reaction.emoji.name === '❎') {
|
||||||
|
|
||||||
|
const successEmbed = new Discord.RichEmbed()
|
||||||
|
.setDescription(`:tickets: <@${message.author.id}> You have canceled your support request.`)
|
||||||
|
.setColor(bot.settings.colour);
|
||||||
|
message.channel.send(successEmbed);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reaction.emoji.name === '✅') {
|
||||||
|
|
||||||
const alreadyopen = new Discord.RichEmbed()
|
const alreadyopen = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Cannot create a ticket because **ticket-${message.author.username}** already exists.`)
|
.setDescription(`:x: Cannot create a ticket because **ticket-${message.author.username}** already exists.`)
|
||||||
.setColor(bot.settings.colour)
|
.setColor(bot.settings.colour)
|
||||||
if (message.guild.channels.find(TicketChannel => TicketChannel.name === 'ticket-' + message.author.username)) return message.channel.send(alreadyopen);
|
if (message.guild.channels.find(TicketChannel => TicketChannel.name === 'ticket-' + message.author.username)) return message.channel.send(alreadyopen);
|
||||||
message.guild.createChannel(`ticket-${message.author.username}`, 'text').then(TicketChannel => {
|
message.guild.createChannel(`ticket-${message.author.username}`, {
|
||||||
|
type: 'text',
|
||||||
|
}).then(TicketChannel => {
|
||||||
|
|
||||||
// Roles
|
// Roles
|
||||||
let staff = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.support}`)
|
let staff = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.support}`)
|
||||||
let everyone = message.guild.roles.find(everyoneRole => everyoneRole.name === `@everyone`)
|
let everyone = message.guild.roles.find(everyoneRole => everyoneRole.name === `@everyone`)
|
||||||
@@ -78,7 +107,27 @@ exports.run = async(bot, message, args) => {
|
|||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Ticket_Command}`)
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.Ticket_Command}`)
|
||||||
|
|
||||||
}
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.Ticket_Command, true)
|
||||||
|
.addField(`Channel`, message.channel, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: bot.settings.Ticket_Command,
|
name: bot.settings.Ticket_Command,
|
||||||
|
|||||||
@@ -31,6 +31,20 @@ exports.run = async(bot, message, args) => {
|
|||||||
|
|
||||||
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.UnLockchat_Command}`)
|
console.log(`\x1b[36m`, `${message.author} has executed ${bot.settings.prefix}${bot.settings.UnLockchat_Command}`)
|
||||||
|
|
||||||
|
const CMDLog = new Discord.RichEmbed()
|
||||||
|
.setTitle(bot.settings.Commands_Log_Title)
|
||||||
|
.addField(`User`, `<@${message.author.id}>`)
|
||||||
|
.addField(`Command`, bot.settings.UnLockchat_Command, true)
|
||||||
|
.addField(`Executed At`, message.createdAt, true)
|
||||||
|
.setColor(bot.settings.colour)
|
||||||
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
|
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel.name === `${bot.settings.Command_Log_Channel}`);
|
||||||
|
if(!CommandLog) return message.channel.send(`:x: Error! Could not find the logs channel. **${bot.settings.Command_Log_Channel}**\nThis can be changed via ``settings.json```);
|
||||||
|
|
||||||
|
CommandLog.send(CMDLog);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
|
// ____ _ ____ _
|
||||||
|
// / ___| _ _ _ __ _ __ ___ _ __| |_| __ ) ___ | |_
|
||||||
|
// \___ \| | | | '_ \| '_ \ / _ \| '__| __| _ \ / _ \| __|
|
||||||
|
// ___) | |_| | |_) | |_) | (_) | | | |_| |_) | (_) | |_
|
||||||
|
// |____/ \__,_| .__/| .__/ \___/|_| \__|____/ \___/ \__|
|
||||||
|
// |_| |_|
|
||||||
|
|
||||||
// Resource: SupportBot
|
// Resource: SupportBot
|
||||||
// Developed by Emerald
|
// Developed by Emerald Services
|
||||||
// Version: 3.4
|
// Version: 4.0.0
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
@@ -41,7 +48,15 @@ fs.readdir("./sb-addons/", (err, files) => {
|
|||||||
|
|
||||||
bot.on("ready", async () => {
|
bot.on("ready", async () => {
|
||||||
bot.user.setActivity(bot.settings.BotStatus, {type:"PLAYING"});
|
bot.user.setActivity(bot.settings.BotStatus, {type:"PLAYING"});
|
||||||
console.log(`\x1b[36m`, `=== [SupportBot] ===\n\nSupportBot - Created by Emerald Services\nInvite ${bot.user.username} to your server\nhttps://discordapp.com/api/oauth2/authorize?client_id=${bot.user.username}&permissions=8&scope=bot\n\n=== [SupportBot] ===`)
|
console.log(`\x1b[36m`, `=== [SupportBot] ===\n\nSupportBot - Created by Emerald Services\nInvite ${bot.user.username} to your server\nhttps://discordapp.com/api/oauth2/authorize?client_id=${bot.user.id}&permissions=8&scope=bot\n\n=== [SupportBot] ===`)
|
||||||
|
console.log(`\u001b[31m`, `------------[ SupportBot ]------------`)
|
||||||
|
console.log(`\u001b[32m`, `Thank you for using SupportBot\n If you have any issues\n contact our team and we will\n give you furthur instructions`)
|
||||||
|
console.log(`\u001b[31m`, `------------[ SupportBot ]------------`)
|
||||||
|
|
||||||
|
console.log(`\u001b[31m`, `\n\n------------[ SupportBot Stats ]------------`)
|
||||||
|
console.log(`\u001b[32m`, `Bot Username: ${bot.user.username}\nInvite Link: https://discordapp.com/api/oauth2/authorize?client_id=${bot.user.username}&permissions=8&scope=bot`)
|
||||||
|
console.log(`\u001b[31m`, `------------[ SupportBot Stats ]------------`)
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.on("message", async message => {
|
bot.on("message", async message => {
|
||||||
@@ -72,17 +87,20 @@ if(!cmd) return;
|
|||||||
cmd.run(bot, message, args);
|
cmd.run(bot, message, args);
|
||||||
});
|
});
|
||||||
|
|
||||||
// [SupportBot] Welcome Message
|
// [SupportBot] Welcome Message && Auto Join Role
|
||||||
|
|
||||||
bot.on("guildMemberAdd", (member) => {
|
bot.on("guildMemberAdd", (member) => {
|
||||||
let channel = member.guild.channels.find(channel => channel.name === `${bot.settings.Welcome_Channel}`)
|
let channel = member.guild.channels.find(channel => channel.name === `${bot.settings.Welcome_Channel}`)
|
||||||
|
let autorole = member.guild.roles.find(autorole => autorole.name === `${bot.settings.Auto_Role}`)
|
||||||
|
|
||||||
const WelcomeMsg= new Discord.RichEmbed()
|
const WelcomeMsg= new Discord.RichEmbed()
|
||||||
.setColor(bot.settings.colour)
|
.setColor(bot.settings.colour)
|
||||||
.setThumbnail(member.user.avatarURL)
|
.setThumbnail(member.user.avatarURL)
|
||||||
.setDescription(`:wave: ${member.user.username}\n${bot.settings.Welcome_Message}`)
|
.setDescription(`:wave: ${member.user.username}\n${bot.settings.Welcome_Message}`)
|
||||||
|
|
||||||
channel.send(WelcomeMsg);
|
channel.send(WelcomeMsg);
|
||||||
|
member.addRole(autorole).catch(console.error);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// [SupportBot] Leave Message
|
// [SupportBot] Leave Message
|
||||||
@@ -99,4 +117,4 @@ bot.on("guildMemberRemove", (member) => {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.login(bot.settings.token);
|
bot.login(bot.settings.token);
|
||||||
+28
-9
@@ -1,18 +1,37 @@
|
|||||||
{
|
{
|
||||||
"name": "supportbot",
|
"name": "SupportBot",
|
||||||
"version": "3.4",
|
"version": "4.0",
|
||||||
"description": "SupportBot",
|
"description": "SupportBot",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"private": "true",
|
||||||
"discord.js": "^11.4.2"
|
|
||||||
},
|
|
||||||
"devDependencies": {},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "!help"
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"start": "node index.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "12.6.0",
|
||||||
|
"npm": "6.9.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"discord.js": "^11.5.1",
|
||||||
|
"array-sort": "^1.0.0",
|
||||||
|
"table": "^5.4.4"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/EmeraldRusher/SupportBot.git"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"SupportBot"
|
"SupportBot",
|
||||||
|
"Emerald Services"
|
||||||
],
|
],
|
||||||
"author": "Emerald Services",
|
"author": "Emerald Services",
|
||||||
"homepage": "https://discord.gg/hmWgxdF"
|
"bugs": {
|
||||||
|
"url": "https://github.com/EmeraldRusher/SupportBot/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://discord.gg/hmWgxdF",
|
||||||
|
"contributors": [
|
||||||
|
"iJosGCS",
|
||||||
|
"RedstoneGamez"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -15,4 +15,4 @@ exports.run = async(bot, message, args) => {
|
|||||||
|
|
||||||
exports.help = {
|
exports.help = {
|
||||||
name: 'addon',
|
name: 'addon',
|
||||||
}
|
}
|
||||||
+69
-63
@@ -1,69 +1,75 @@
|
|||||||
{
|
{
|
||||||
|
"SupportBot": "v4.0.0",
|
||||||
|
|
||||||
|
"token": "BOT_TOKEN_HERE",
|
||||||
|
"prefix": "!",
|
||||||
|
"botname": "SupportBot",
|
||||||
|
"colour": "#13bd2a",
|
||||||
|
"footer": "Support Bot, By Emerald Services",
|
||||||
|
|
||||||
|
"BotStatus": "Support Bot",
|
||||||
|
|
||||||
|
"staff": "Staff",
|
||||||
|
"support": "Support",
|
||||||
|
"everyone": "@everyone",
|
||||||
|
"Auto_Role": "Member",
|
||||||
|
|
||||||
|
"LINKS": {
|
||||||
|
"Discord": "https://discord.gg/",
|
||||||
|
"Twitter": "https://twitter.com/",
|
||||||
|
"Website": "https://example.com/",
|
||||||
|
"AddMore": "AddMoreIfYouWant"
|
||||||
|
},
|
||||||
|
|
||||||
|
"LINKS_TITLE": "SupportBot Links",
|
||||||
|
|
||||||
"SupportBot": "v3.4 / Download addons @ https://itzemerald.tk/",
|
"category": "Tickets",
|
||||||
|
"Ticket_Message": "Your support ticket has been opened successfully\nPlease allow us some time to reach out to you.",
|
||||||
|
"Ticket_Logs": "ticket-logs",
|
||||||
|
"bot.settings.Default_Ticket_Reason": "No Subject",
|
||||||
|
"Ticket_React_Message": ":mailbox: React to create your support ticket.",
|
||||||
|
|
||||||
|
"Commands_Log_Title": "SupportBot Logs",
|
||||||
|
"Command_Log_Channel": "command-logs",
|
||||||
|
|
||||||
"token": "TOKEN",
|
"Announcement_Title": "SupportBot Announcement",
|
||||||
"prefix": "!",
|
"Announcement_Channel": "announcements",
|
||||||
"botname": "SupportBot",
|
"Announcement_Tag_Role": "@everyone",
|
||||||
"colour": "#42f477",
|
|
||||||
"footer": "Support Bot, By Emerald",
|
"Welcome_Message": "Welcome to the server!",
|
||||||
|
"Welcome_Channel": "welcome",
|
||||||
|
|
||||||
|
"Leave_Message": "Thank you for visiting us!",
|
||||||
|
"Leave_Channel": "welcome",
|
||||||
|
|
||||||
"BotStatus": "Support Bot",
|
"Poll_Channel": "polls",
|
||||||
|
"Poll_Title": "📊 Polls",
|
||||||
"staff": "Staff",
|
"Reaction_Poll_1": "✅",
|
||||||
"support": "Support",
|
"Reaction_Poll_2": "❎",
|
||||||
"everyone": "@everyone",
|
|
||||||
|
"Suggestion_Title": "SupportBot Suggestions",
|
||||||
"category": "Tickets",
|
"Suggestion_Channel": "suggestions",
|
||||||
"Ticket_Message": "Your support ticket has been opened successfully\nPlease allow us some time to reach out to you.",
|
"suggestyes": "✅",
|
||||||
"Ticket_Logs": "ticket-logs",
|
"suggestno": "❎",
|
||||||
|
|
||||||
"Announcement_Title": "SupportBot Announcement",
|
"Report_Channel": "reports",
|
||||||
"Announcement_Channel": "announcements",
|
"Report_Title": "SupportBot Report",
|
||||||
|
|
||||||
"Welcome_Message": "Welcome to the server!",
|
|
||||||
"Welcome_Channel": "welcome",
|
|
||||||
|
|
||||||
"Leave_Message": "Thank you for visiting us!",
|
|
||||||
"Leave_Channel": "welcome",
|
|
||||||
|
|
||||||
"Poll_Channel": "polls",
|
|
||||||
"Poll_Title": "📊 Polls",
|
|
||||||
"Reaction_Poll_1": "✅",
|
|
||||||
"Reaction_Poll_2": "❎",
|
|
||||||
|
|
||||||
"Suggestion_Title": "SupportBot Suggestions",
|
|
||||||
"Suggestion_Channel": "suggestions",
|
|
||||||
"suggestyes": "✅",
|
|
||||||
"suggestno": "❎",
|
|
||||||
|
|
||||||
"Report_Channel": "reports",
|
|
||||||
"Report_Title": "SupportBot Report",
|
|
||||||
|
|
||||||
"LINK_1_NAME": "Discord",
|
|
||||||
"LINK_2_NAME": "Twitter",
|
|
||||||
"LINK_3_NAME": "Website",
|
|
||||||
|
|
||||||
"LINK_1": "https://dicord.gg/changemeinconfig",
|
|
||||||
"LINK_2": "https://twitter.com/changemeinconfig",
|
|
||||||
"LINK_3": "https://www.example.com/",
|
|
||||||
|
|
||||||
"LINKS_TITLE": "SupportBot Links",
|
|
||||||
|
|
||||||
"Ticket_Command": "ticket",
|
|
||||||
"Suggest_Command": "suggest",
|
|
||||||
"Say_Command": "say",
|
|
||||||
"Remove_Command": "remove",
|
|
||||||
"Add_Command": "add",
|
|
||||||
"Ping_Command": "ping",
|
|
||||||
"Close_Command": "close",
|
|
||||||
"Forceclose_Command": "forceclose",
|
|
||||||
"Rename_Command": "rename",
|
|
||||||
"Help_Command": "help",
|
|
||||||
"Link_Command": "links",
|
|
||||||
"Lockchat_Command": "lock",
|
|
||||||
"UnLockchat_Command": "unlock",
|
|
||||||
"Poll_Command": "poll",
|
|
||||||
"Report_Command": "report"
|
|
||||||
|
|
||||||
|
"Announcement_Command": "announce",
|
||||||
|
"Say_Command": "say",
|
||||||
|
"Suggest_Command": "suggest",
|
||||||
|
"Ping_Command": "ping",
|
||||||
|
"Ticket_Command": "ticket",
|
||||||
|
"Remove_Command": "remove",
|
||||||
|
"Add_Command": "add",
|
||||||
|
"Close_Command": "close",
|
||||||
|
"Forceclose_Command": "forceclose",
|
||||||
|
"Rename_Command": "rename",
|
||||||
|
"Help_Command": "help",
|
||||||
|
"Link_Command": "links",
|
||||||
|
"Lockchat_Command": "lock",
|
||||||
|
"UnLockchat_Command": "unlock",
|
||||||
|
"Poll_Command": "poll",
|
||||||
|
"Report_Command": "report"
|
||||||
}
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
node index.js
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
node index.js
|
||||||
Reference in new issue
Block a user