Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de0ec97d9b |
No files matched your search
@@ -6,7 +6,7 @@ const bot = new Discord.Client()
|
|||||||
|
|
||||||
bot.settings = require("../settings.json");
|
bot.settings = require("../settings.json");
|
||||||
|
|
||||||
exports.run = (bot, message, args) => {
|
exports.run = async(bot, message, args) => {
|
||||||
message.delete();
|
message.delete();
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
||||||
@@ -32,7 +32,7 @@ exports.run = (bot, message, args) => {
|
|||||||
if(!ac) return message.channel.send(`:x: Error! Could not find the logs channel **${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(embed)
|
||||||
ac.send(`${bot.settings.Annuoncement_Tag_Role}`)
|
// ac.send("@everyone")
|
||||||
|
|
||||||
const SuggestionSuccessEmbed = new Discord.RichEmbed()
|
const SuggestionSuccessEmbed = new Discord.RichEmbed()
|
||||||
.setDescription(`:white_check_mark: You have successfully created an announcement. <#${ac.id}>`)
|
.setDescription(`:white_check_mark: You have successfully created an announcement. <#${ac.id}>`)
|
||||||
@@ -50,7 +50,7 @@ exports.run = (bot, message, args) => {
|
|||||||
.setColor(bot.settings.colour)
|
.setColor(bot.settings.colour)
|
||||||
.setFooter(bot.settings.footer)
|
.setFooter(bot.settings.footer)
|
||||||
|
|
||||||
let CommandLog = message.guild.channels.find(LogsChannel => LogsChannel === `${bot.settings.Command_Log_Channel}`);
|
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```);
|
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);
|
CommandLog.send(CMDLog);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ exports.run = async(bot, message, args) => {
|
|||||||
message.delete();
|
message.delete();
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
||||||
let everyoneRole = message.guild.roles.find(everyone => everyone.name === `${bot.settings.everyone}`)
|
let lockedRole = message.guild.roles.find(lc => lc.name === `${bot.settings.locked_role}`)
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
const rolemissing = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
||||||
@@ -22,7 +22,8 @@ exports.run = async(bot, message, args) => {
|
|||||||
.setColor(bot.settings.colour)
|
.setColor(bot.settings.colour)
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
||||||
|
|
||||||
message.channel.overwritePermissions(everyoneRole, { READ_MESSAGES: false, SEND_MESSAGES: false });
|
message.channel.overwritePermissions(lockedRole, { READ_MESSAGES: false, SEND_MESSAGES: false });
|
||||||
|
message.channel.overwritePermissions(staffGroup, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
||||||
|
|
||||||
const lockmsg = new Discord.RichEmbed()
|
const lockmsg = new Discord.RichEmbed()
|
||||||
.setDescription(":white_check_mark: **Chat Locked**")
|
.setDescription(":white_check_mark: **Chat Locked**")
|
||||||
|
|||||||
+2
-2
@@ -48,12 +48,12 @@ exports.run = (bot, message, args) => {
|
|||||||
}).then(TicketChannel => {
|
}).then(TicketChannel => {
|
||||||
|
|
||||||
// Roles
|
// Roles
|
||||||
let staff = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.support}`)
|
let support = message.guild.roles.find(supportRole => supportRole.name === `${bot.settings.support}`)
|
||||||
let everyone = message.guild.roles.find(everyoneRole => everyoneRole.name === `@everyone`)
|
let everyone = message.guild.roles.find(everyoneRole => everyoneRole.name === `@everyone`)
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
TicketChannel.overwritePermissions(everyone, { SEND_MESSAGES: false, READ_MESSAGES: false })
|
TicketChannel.overwritePermissions(everyone, { SEND_MESSAGES: false, READ_MESSAGES: false })
|
||||||
TicketChannel.overwritePermissions(staff, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
TicketChannel.overwritePermissions(support, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
||||||
TicketChannel.overwritePermissions(message.author, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
TicketChannel.overwritePermissions(message.author, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
||||||
TicketChannel.overwritePermissions(bot.user, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
TicketChannel.overwritePermissions(bot.user, { SEND_MESSAGES: true, READ_MESSAGES: true })
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -10,7 +10,7 @@ exports.run = async(bot, message, args) => {
|
|||||||
message.delete();
|
message.delete();
|
||||||
|
|
||||||
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
let staffGroup = message.guild.roles.find(staffRole => staffRole.name === `${bot.settings.staff}`)
|
||||||
let everyoneRole = message.guild.roles.find(everyone => everyone.name === `${bot.settings.everyone}`)
|
let lockedRole = message.guild.roles.find(lc => lc.name === `${bot.settings.locked_role}`)
|
||||||
|
|
||||||
const rolemissing = new Discord.RichEmbed()
|
const rolemissing = new Discord.RichEmbed()
|
||||||
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
.setDescription(`:x: Looks like this server doesn't have the role **${bot.settings.staff}**`)
|
||||||
@@ -22,8 +22,8 @@ exports.run = async(bot, message, args) => {
|
|||||||
.setColor(bot.settings.colour)
|
.setColor(bot.settings.colour)
|
||||||
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
if (!message.member.roles.has(staffGroup.id)) return message.reply(donothaverole)
|
||||||
|
|
||||||
message.channel.overwritePermissions(everyoneRole, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
message.channel.overwritePermissions(lockedRole, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
||||||
|
message.channel.overwritePermissions(staffGroup, { READ_MESSAGES: true, SEND_MESSAGES: true });
|
||||||
const lockmsg = new Discord.RichEmbed()
|
const lockmsg = new Discord.RichEmbed()
|
||||||
.setDescription(":white_check_mark: **Chat Un-Locked**")
|
.setDescription(":white_check_mark: **Chat Un-Locked**")
|
||||||
.setColor(bot.settings.colour)
|
.setColor(bot.settings.colour)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
// Resource: SupportBot
|
// Resource: SupportBot
|
||||||
// Developed by Emerald Services
|
// Developed by Emerald Services
|
||||||
// Version: 4.0.0
|
// Version: 4.0.1
|
||||||
|
|
||||||
const Discord = require("discord.js");
|
const Discord = require("discord.js");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
@@ -48,7 +48,6 @@ 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.id}&permissions=8&scope=bot\n\n=== [SupportBot] ===`)
|
|
||||||
console.log(`\u001b[31m`, `------------[ 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[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`, `------------[ SupportBot ]------------`)
|
||||||
|
|||||||
Generated
+53
@@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
"name": "SupportBot",
|
||||||
|
"version": "4.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"async-limiter": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
|
||||||
|
},
|
||||||
|
"discord.js": {
|
||||||
|
"version": "11.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-11.5.1.tgz",
|
||||||
|
"integrity": "sha512-tGhV5xaZXE3Z+4uXJb3hYM6gQ1NmnSxp9PClcsSAYFVRzH6AJH74040mO3afPDMWEAlj8XsoPXXTJHTxesqcGw==",
|
||||||
|
"requires": {
|
||||||
|
"long": "^4.0.0",
|
||||||
|
"prism-media": "^0.0.3",
|
||||||
|
"snekfetch": "^3.6.4",
|
||||||
|
"tweetnacl": "^1.0.0",
|
||||||
|
"ws": "^6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"long": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
|
||||||
|
},
|
||||||
|
"prism-media": {
|
||||||
|
"version": "0.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.3.tgz",
|
||||||
|
"integrity": "sha512-c9KkNifSMU/iXT8FFTaBwBMr+rdVcN+H/uNv1o+CuFeTThNZNTOrQ+RgXA1yL/DeLk098duAeRPP3QNPNbhxYQ=="
|
||||||
|
},
|
||||||
|
"snekfetch": {
|
||||||
|
"version": "3.6.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz",
|
||||||
|
"integrity": "sha512-NjxjITIj04Ffqid5lqr7XdgwM7X61c/Dns073Ly170bPQHLm6jkmelye/eglS++1nfTWktpP6Y2bFXjdPlQqdw=="
|
||||||
|
},
|
||||||
|
"tweetnacl": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-kcoMoKTPYnoeS50tzoqjPY3Uv9axeuuFAZY9M/9zFnhoVvRfxz9K29IMPD7jGmt2c8SW7i3gT9WqDl2+nV7p4A=="
|
||||||
|
},
|
||||||
|
"ws": {
|
||||||
|
"version": "6.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
|
||||||
|
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
|
||||||
|
"requires": {
|
||||||
|
"async-limiter": "~1.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -13,8 +13,8 @@
|
|||||||
"npm": "6.9.0"
|
"npm": "6.9.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"discord.js": "^11.5.1",
|
|
||||||
"array-sort": "^1.0.0",
|
"array-sort": "^1.0.0",
|
||||||
|
"discord.js": "^11.5.1",
|
||||||
"table": "^5.4.4"
|
"table": "^5.4.4"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
+3
-2
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"SupportBot": "v4.0.0",
|
"SupportBot": "v4.0.1",
|
||||||
|
|
||||||
"token": "BOT_TOKEN_HERE",
|
"token": "BOT_TOKEN_HERE",
|
||||||
"prefix": "!",
|
"prefix": "!d",
|
||||||
"botname": "SupportBot",
|
"botname": "SupportBot",
|
||||||
"colour": "#13bd2a",
|
"colour": "#13bd2a",
|
||||||
"footer": "Support Bot, By Emerald Services",
|
"footer": "Support Bot, By Emerald Services",
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
"staff": "Staff",
|
"staff": "Staff",
|
||||||
"support": "Support",
|
"support": "Support",
|
||||||
|
"locked_role": "@everyone",
|
||||||
"everyone": "@everyone",
|
"everyone": "@everyone",
|
||||||
"Auto_Role": "Member",
|
"Auto_Role": "Member",
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user