updated how blacklist work
This commit is contained in:
parent
2ad41730ba
commit
c97a9d4ad4
30 changed files with 179 additions and 122 deletions
|
@ -1,7 +1,8 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const fetch = require('node-fetch')
|
const fetch = require('node-fetch')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
|
|
||||||
module.exports = class AdviceCommand extends Command {
|
module.exports = class AdviceCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -14,8 +15,10 @@ module.exports = class AdviceCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
fetch("http://api.adviceslip.com/advice").then((response) => {
|
fetch("http://api.adviceslip.com/advice").then((response) => {
|
||||||
return response.json();
|
return response.json();
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const fetch = require('node-fetch')
|
const fetch = require('node-fetch')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
|
|
||||||
module.exports = class BadMemeCommand extends Command {
|
module.exports = class BadMemeCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,8 +14,9 @@ module.exports = class BadMemeCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
fetch("https://api.imgur.com/3/gallery/hot/day?showViral=true&mature=false&perPage=100&album_previews=true", {
|
fetch("https://api.imgur.com/3/gallery/hot/day?showViral=true&mature=false&perPage=100&album_previews=true", {
|
||||||
headers: { "Authorization": "Client-ID e4cb6948f80f295" },
|
headers: { "Authorization": "Client-ID e4cb6948f80f295" },
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class clapCommand extends Command {
|
module.exports = class clapCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -19,8 +19,10 @@ module.exports = class clapCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { text }) {
|
async run(message, { text }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
let clap = text.replace(/ /g, ' 👏 ');
|
let clap = text.replace(/ /g, ' 👏 ');
|
||||||
message.delete();
|
message.delete();
|
||||||
message.say(`${clap} 👏`);
|
message.say(`${clap} 👏`);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const responseObject = require("../../json/randVid.json");
|
const responseObject = require("../../json/randVid.json");
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class dankCommand extends Command {
|
module.exports = class dankCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -13,8 +13,10 @@ module.exports = class dankCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
const number = Object.keys(responseObject).length;
|
const number = Object.keys(responseObject).length;
|
||||||
const vidNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
const vidNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
||||||
message.channel.send(`${vidNumber}: ${responseObject[vidNumber]}`);
|
message.channel.send(`${vidNumber}: ${responseObject[vidNumber]}`);
|
||||||
|
|
|
@ -3,8 +3,8 @@ const responseObject = require("../../json/despacito.json");
|
||||||
const { createCanvas, loadImage, getContext } = require('canvas')
|
const { createCanvas, loadImage, getContext } = require('canvas')
|
||||||
const superagent = require('superagent')
|
const superagent = require('superagent')
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class DespacitoCommand extends Command {
|
module.exports = class DespacitoCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -24,8 +24,10 @@ module.exports = class DespacitoCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { user }) {
|
async run(message, { user }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
const number = Object.keys(responseObject).length;
|
const number = Object.keys(responseObject).length;
|
||||||
const despacitoNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
const despacitoNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const emojiCharacters = require('../../emojiCharacters');
|
const emojiCharacters = require('../../emojiCharacters');
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class emoteSayCommand extends Command {
|
module.exports = class emoteSayCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -20,8 +20,10 @@ module.exports = class emoteSayCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { text }) {
|
async run(message, { text }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
message.delete();
|
message.delete();
|
||||||
let emojiArray = [];
|
let emojiArray = [];
|
||||||
for (let i = 0; i < text.length; i++)
|
for (let i = 0; i < text.length; i++)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const responseObject = require("../../json/funfact.json");
|
const responseObject = require("../../json/funfact.json");
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class FunFactCommand extends Command {
|
module.exports = class FunFactCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -13,8 +13,10 @@ module.exports = class FunFactCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
const number = Object.keys(responseObject).length;
|
const number = Object.keys(responseObject).length;
|
||||||
const funFactNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
const funFactNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1;
|
||||||
message.channel.send(`Fun fact: ${responseObject[funFactNumber]}`);
|
message.channel.send(`Fun fact: ${responseObject[funFactNumber]}`);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const fetch = require('node-fetch')
|
const fetch = require('node-fetch')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
|
|
||||||
module.exports = class BadMemeCommand extends Command {
|
module.exports = class BadMemeCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -14,8 +15,9 @@ module.exports = class BadMemeCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
fetch('http://inspirobot.me/api?generate=true')
|
fetch('http://inspirobot.me/api?generate=true')
|
||||||
.then(res => res.text())
|
.then(res => res.text())
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const printer = require('printer');
|
const printer = require('printer');
|
||||||
const { printChannel } = require('../../config.json');
|
const { printChannel } = require('../../config.json');
|
||||||
const blacklist = require('../../json/blacklist.json');
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
module.exports = class printCommand extends Command {
|
const blacklist = require('../../blacklist');module.exports = class printCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
name: 'print',
|
name: 'print',
|
||||||
|
@ -25,13 +25,11 @@ module.exports = class printCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { text }) {
|
async run(message, { text }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
const channel = this.client.channels.get(printChannel);
|
const channel = this.client.channels.get(printChannel);
|
||||||
|
|
||||||
|
|
||||||
printer.printDirect({data:`Printed by: ${message.author.username}\n\n${text}`
|
printer.printDirect({data:`Printed by: ${message.author.username}\n\n${text}`
|
||||||
, type: 'TEXT' // type: RAW, TEXT, PDF, JPEG, .. depends on platform
|
, type: 'TEXT' // type: RAW, TEXT, PDF, JPEG, .. depends on platform
|
||||||
, success:function(jobID){
|
, success:function(jobID){
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class redditCommand extends Command {
|
module.exports = class redditCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -21,8 +21,10 @@ module.exports = class redditCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { sub }) {
|
async run(message, { sub }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
let /* the bodies hit the */ i = Math.floor((Math.random() * 10) + 1);
|
let /* the bodies hit the */ i = Math.floor((Math.random() * 10) + 1);
|
||||||
let a = 0
|
let a = 0
|
||||||
fetch('https://www.reddit.com/r/' + sub + '.json?limit=100').then((response) => {
|
fetch('https://www.reddit.com/r/' + sub + '.json?limit=100').then((response) => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class sayCommand extends Command {
|
module.exports = class sayCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -19,8 +19,10 @@ module.exports = class sayCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { text }) {
|
async run(message, { text }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
message.delete();
|
message.delete();
|
||||||
message.say(text);
|
message.say(text);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const faceapp = require('faceapp')
|
const faceapp = require('faceapp')
|
||||||
const superagent = require('superagent')
|
const superagent = require('superagent')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
|
|
||||||
module.exports = class faceappCommand extends Command {
|
module.exports = class faceappCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -29,8 +30,9 @@ module.exports = class faceappCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { url, type }) {
|
async run(message, { url, type }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
let Attachment = (message.attachments).array();
|
let Attachment = (message.attachments).array();
|
||||||
let origin = null;
|
let origin = null;
|
||||||
|
|
|
@ -2,8 +2,8 @@ const { Command } = require('discord.js-commando');
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const { createCanvas, loadImage, getContext } = require('canvas')
|
const { createCanvas, loadImage, getContext } = require('canvas')
|
||||||
const superagent = require('superagent')
|
const superagent = require('superagent')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
|
|
||||||
|
|
||||||
module.exports = class fetishCommand extends Command {
|
module.exports = class fetishCommand extends Command {
|
||||||
|
@ -17,8 +17,10 @@ module.exports = class fetishCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
let Attachment = (message.attachments).array();
|
let Attachment = (message.attachments).array();
|
||||||
let image = null
|
let image = null
|
||||||
if (!Attachment[0])
|
if (!Attachment[0])
|
||||||
|
|
|
@ -2,8 +2,8 @@ const { Command } = require('discord.js-commando');
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const { createCanvas, loadImage, getContext } = require('canvas')
|
const { createCanvas, loadImage, getContext } = require('canvas')
|
||||||
const superagent = require('superagent')
|
const superagent = require('superagent')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
|
|
||||||
|
|
||||||
module.exports = class godCommand extends Command {
|
module.exports = class godCommand extends Command {
|
||||||
|
@ -17,8 +17,10 @@ module.exports = class godCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
let Attachment = (message.attachments).array();
|
let Attachment = (message.attachments).array();
|
||||||
let image = null
|
let image = null
|
||||||
if (!Attachment[0])
|
if (!Attachment[0])
|
||||||
|
|
|
@ -2,8 +2,8 @@ const { Command } = require('discord.js-commando');
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const { createCanvas, loadImage, getContext } = require('canvas')
|
const { createCanvas, loadImage, getContext } = require('canvas')
|
||||||
const superagent = require('superagent')
|
const superagent = require('superagent')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
|
|
||||||
|
|
||||||
module.exports = class humanCommand extends Command {
|
module.exports = class humanCommand extends Command {
|
||||||
|
@ -17,8 +17,10 @@ module.exports = class humanCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
let Attachment = (message.attachments).array();
|
let Attachment = (message.attachments).array();
|
||||||
let image = null
|
let image = null
|
||||||
if (!Attachment[0])
|
if (!Attachment[0])
|
||||||
|
|
|
@ -2,8 +2,8 @@ const { Command } = require('discord.js-commando');
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const { createCanvas, loadImage, getContext } = require('canvas')
|
const { createCanvas, loadImage, getContext } = require('canvas')
|
||||||
const superagent = require('superagent')
|
const superagent = require('superagent')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
|
|
||||||
|
|
||||||
module.exports = class idubbbzCommand extends Command {
|
module.exports = class idubbbzCommand extends Command {
|
||||||
|
@ -26,8 +26,10 @@ module.exports = class idubbbzCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { text }) {
|
async run(message, { text }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
let Attachment = (message.attachments).array();
|
let Attachment = (message.attachments).array();
|
||||||
let image = null
|
let image = null
|
||||||
if (!Attachment[0])
|
if (!Attachment[0])
|
||||||
|
|
|
@ -2,8 +2,8 @@ const { Command } = require('discord.js-commando');
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const { createCanvas, loadImage, getContext } = require('canvas')
|
const { createCanvas, loadImage, getContext } = require('canvas')
|
||||||
const superagent = require('superagent')
|
const superagent = require('superagent')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
|
|
||||||
|
|
||||||
module.exports = class idubbbzpaintCommand extends Command {
|
module.exports = class idubbbzpaintCommand extends Command {
|
||||||
|
@ -26,8 +26,10 @@ module.exports = class idubbbzpaintCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { text }) {
|
async run(message, { text }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
let Attachment = (message.attachments).array();
|
let Attachment = (message.attachments).array();
|
||||||
let image = null
|
let image = null
|
||||||
if (!Attachment[0])
|
if (!Attachment[0])
|
||||||
|
|
|
@ -2,8 +2,8 @@ const { Command } = require('discord.js-commando');
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const { createCanvas, loadImage, getContext } = require('canvas')
|
const { createCanvas, loadImage, getContext } = require('canvas')
|
||||||
const superagent = require('superagent')
|
const superagent = require('superagent')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
|
|
||||||
|
|
||||||
module.exports = class likeCommand extends Command {
|
module.exports = class likeCommand extends Command {
|
||||||
|
@ -17,8 +17,10 @@ module.exports = class likeCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
let Attachment = (message.attachments).array();
|
let Attachment = (message.attachments).array();
|
||||||
let image = null
|
let image = null
|
||||||
if (!Attachment[0])
|
if (!Attachment[0])
|
||||||
|
|
|
@ -2,8 +2,8 @@ const { Command } = require('discord.js-commando');
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const { createCanvas, loadImage, getContext } = require('canvas')
|
const { createCanvas, loadImage, getContext } = require('canvas')
|
||||||
const superagent = require('superagent')
|
const superagent = require('superagent')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
|
|
||||||
|
|
||||||
module.exports = class uglyCommand extends Command {
|
module.exports = class uglyCommand extends Command {
|
||||||
|
@ -17,8 +17,10 @@ module.exports = class uglyCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
let Attachment = (message.attachments).array();
|
let Attachment = (message.attachments).array();
|
||||||
let image = null
|
let image = null
|
||||||
if (!Attachment[0])
|
if (!Attachment[0])
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
|
|
||||||
module.exports = class AvatarCommand extends Command {
|
module.exports = class AvatarCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -20,8 +21,10 @@ module.exports = class AvatarCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { user }) {
|
async run(message, { user }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
if (!user)
|
if (!user)
|
||||||
return message.say(`Your avatar:\n${message.author.displayAvatarURL}`);
|
return message.say(`Your avatar:\n${message.author.displayAvatarURL}`);
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const youtubedl = require('youtube-dl');
|
const youtubedl = require('youtube-dl');
|
||||||
const blacklist = require('../../json/blacklist.json');
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
const { fbuser, fbpasswd } = require('../../config.json');
|
const { fbuser, fbpasswd } = require('../../config.json');
|
||||||
|
|
||||||
module.exports = class downloadCommand extends Command {
|
module.exports = class downloadCommand extends Command {
|
||||||
|
@ -23,8 +24,10 @@ module.exports = class downloadCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { link }) {
|
async run(message, { link }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
if(link.includes("http") || link.includes("www")) {
|
if(link.includes("http") || link.includes("www")) {
|
||||||
message.say('Downloading...').then(msg => {
|
message.say('Downloading...').then(msg => {
|
||||||
video.on('end', function() {
|
video.on('end', function() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const { feedbackChannel } = require('../../config.json');
|
const { feedbackChannel } = require('../../config.json');
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
module.exports = class feedbackCommand extends Command {
|
module.exports = class feedbackCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -25,8 +25,10 @@ module.exports = class feedbackCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { text }) {
|
async run(message, { text }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
const channel = this.client.channels.get(feedbackChannel);
|
const channel = this.client.channels.get(feedbackChannel);
|
||||||
channel.send(`from ${message.author.username} (${message.author.id}) : ${text}`);
|
channel.send(`from ${message.author.username} (${message.author.id}) : ${text}`);
|
||||||
message.say('Your feedback has been sent!');
|
message.say('Your feedback has been sent!');
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const fetch = require('node-fetch')
|
const fetch = require('node-fetch')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class InfoCommand extends Command {
|
module.exports = class InfoCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -21,8 +21,10 @@ module.exports = class InfoCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { search }) {
|
async run(message, { search }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
let searchURL = encodeURI(search)
|
let searchURL = encodeURI(search)
|
||||||
fetch("https://api.duckduckgo.com/?q=" + searchURL + "&format=json").then((response) => {
|
fetch("https://api.duckduckgo.com/?q=" + searchURL + "&format=json").then((response) => {
|
||||||
return response.json();
|
return response.json();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const { supportServer } = require('../../config.json')
|
const { supportServer } = require('../../config.json')
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class InviteCommand extends Command {
|
module.exports = class InviteCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -13,8 +13,10 @@ module.exports = class InviteCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
message.say('Check your dm')
|
message.say('Check your dm')
|
||||||
return message.author.send(`You can add me from here: https://discordapp.com/oauth2/authorize?client_id=${this.client.user.id}&scope=bot&permissions=0\nYou can also join my support server over here: ${supportServer} come and say hi :)`);
|
return message.author.send(`You can add me from here: https://discordapp.com/oauth2/authorize?client_id=${this.client.user.id}&scope=bot&permissions=0\nYou can also join my support server over here: ${supportServer} come and say hi :)`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const { oneLine } = require('common-tags');
|
const { oneLine } = require('common-tags');
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class PingCommand extends Command {
|
module.exports = class PingCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -16,20 +16,22 @@ module.exports = class PingCommand extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(msg) {
|
async run(message) {
|
||||||
if(blacklist[msg.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return msg.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
if(!msg.editable) {
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
const pingMsg = await msg.say('Pinging...');
|
|
||||||
|
if(!message.editable) {
|
||||||
|
const pingMsg = await message.say('Pinging...');
|
||||||
return pingMsg.edit(oneLine`
|
return pingMsg.edit(oneLine`
|
||||||
${msg.channel.type !== 'dm' ? `${msg.author},` : ''}
|
${message.channel.type !== 'dm' ? `${message.author},` : ''}
|
||||||
<:ping:499226870047571978> Pong! The message round-trip took **${pingMsg.createdTimestamp - msg.createdTimestamp}**ms.
|
<:ping:499226870047571978> Pong! The message round-trip took **${pingMsg.createdTimestamp - message.createdTimestamp}**ms.
|
||||||
${this.client.ping ? `The heartbeat ping is **${Math.round(this.client.ping)}**ms.` : ''}
|
${this.client.ping ? `The heartbeat ping is **${Math.round(this.client.ping)}**ms.` : ''}
|
||||||
`);
|
`);
|
||||||
} else {
|
} else {
|
||||||
await msg.edit('Pinging...');
|
await message.edit('Pinging...');
|
||||||
return msg.edit(oneLine`
|
return message.edit(oneLine`
|
||||||
Pong! The message round-trip took **${msg.editedTimestamp - msg.createdTimestamp}**ms.
|
Pong! The message round-trip took **${message.editedTimestamp - message.createdTimestamp}**ms.
|
||||||
${this.client.ping ? `The heartbeat ping is **${Math.round(this.client.ping)}**ms.` : ''}
|
${this.client.ping ? `The heartbeat ping is **${Math.round(this.client.ping)}**ms.` : ''}
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class ServerCommand extends Command {
|
module.exports = class ServerCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -14,8 +14,10 @@ module.exports = class ServerCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
const addEmbed = {
|
const addEmbed = {
|
||||||
color: 0x0099ff,
|
color: 0x0099ff,
|
||||||
title: 'Stats of the server',
|
title: 'Stats of the server',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class statsCommand extends Command {
|
module.exports = class statsCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -12,8 +12,10 @@ module.exports = class statsCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
let totalSeconds = (this.client.uptime / 1000);
|
let totalSeconds = (this.client.uptime / 1000);
|
||||||
let days = Math.floor(totalSeconds / 86400);
|
let days = Math.floor(totalSeconds / 86400);
|
||||||
let hours = Math.floor(totalSeconds / 3600);
|
let hours = Math.floor(totalSeconds / 3600);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class supportMeCommand extends Command {
|
module.exports = class supportMeCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -12,8 +12,10 @@ module.exports = class supportMeCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, { text }) {
|
async run(message, { text }) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
message.say('If you want to support me and my bot you can donate here\nhttps://donatebot.io/checkout/487640086859743232\n(This is totally optional dont feel forced to do it)');
|
message.say('If you want to support me and my bot you can donate here\nhttps://donatebot.io/checkout/487640086859743232\n(This is totally optional dont feel forced to do it)');
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -1,6 +1,6 @@
|
||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const blacklist = require('../../json/blacklist.json')
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
|
const blacklist = require('../../blacklist');
|
||||||
module.exports = class UpDootCommand extends Command {
|
module.exports = class UpDootCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
|
@ -13,8 +13,10 @@ module.exports = class UpDootCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message) {
|
async run(message) {
|
||||||
if(blacklist[message.author.id])
|
let blacklistJson = new SelfReloadJSON('../../json/blacklist.json');
|
||||||
return message.channel.send("You are blacklisted")
|
if(blacklistJson[message.author.id])
|
||||||
|
return blacklist(blacklistJson[message.author.id] , message)
|
||||||
|
|
||||||
const upDoot = {
|
const upDoot = {
|
||||||
color: 0x93C54B,
|
color: 0x93C54B,
|
||||||
title: 'Vote for my bot',
|
title: 'Vote for my bot',
|
||||||
|
|
2
index.js
2
index.js
|
@ -5,7 +5,7 @@ const { token, prefix, statsChannel, ownerID, supportServer } = require('./confi
|
||||||
const responseObject = require("./json/reply.json");
|
const responseObject = require("./json/reply.json");
|
||||||
const reactObject = require("./json/react.json");
|
const reactObject = require("./json/react.json");
|
||||||
const imgResponseObject = require("./json/imgreply.json");
|
const imgResponseObject = require("./json/imgreply.json");
|
||||||
var SelfReloadJSON = require('self-reload-json');
|
const SelfReloadJSON = require('self-reload-json');
|
||||||
// Prefix and ownerID and invite to support server
|
// Prefix and ownerID and invite to support server
|
||||||
const client = new CommandoClient({
|
const client = new CommandoClient({
|
||||||
commandPrefix: prefix,
|
commandPrefix: prefix,
|
||||||
|
|
Loading…
Reference in a new issue