fixed blacklist

Commando
Loic Bersier 6 years ago
parent f223d27533
commit 24decdbf9a

@ -1,4 +1,6 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const blacklist = require('../../json/blacklist.json');
module.exports = class BanCommand extends Command { module.exports = class BanCommand extends Command {
constructor(client) { constructor(client) {
super(client, { super(client, {
@ -13,7 +15,7 @@ module.exports = class BanCommand extends Command {
{ {
key: 'member', key: 'member',
prompt: 'Wich member would you like to ban?', prompt: 'Wich member would you like to ban?',
type: 'user', type: 'member',
}, },
{ {
key: 'reasons', key: 'reasons',
@ -32,8 +34,13 @@ module.exports = class BanCommand extends Command {
reasons = 'Nothing have been specified' reasons = 'Nothing have been specified'
if(member.id === message.author.id) if(member.id === message.author.id)
return message.say("Why would you ban yourself ?") return message.say("Why would you ban yourself ?")
try {
await member.send(`https://youtu.be/55-mHgUjZfY\nYou have been banned for the following reasons: "${reasons}"`) await member.send(`https://youtu.be/55-mHgUjZfY\nYou have been banned for the following reasons: "${reasons}"`)
.error(err => console.error(`Could not dm the user, probably disabled\n${err}`)) } catch(err) {
console.error(`Could not dm the user, probably disabled\n${err}`)
}
member.ban(`Banned by : ${message.author.username} for the following reasons : ${reasons}`) member.ban(`Banned by : ${message.author.username} for the following reasons : ${reasons}`)
.then(() => message.reply(`${member.user.username} was succesfully banned with the following reasons "${reasons}".`)) .then(() => message.reply(`${member.user.username} was succesfully banned with the following reasons "${reasons}".`))

@ -1,4 +1,6 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const blacklist = require('../../json/blacklist.json');
module.exports = class cbCommand extends Command { module.exports = class cbCommand extends Command {
constructor(client) { constructor(client) {
super(client, { super(client, {

@ -1,4 +1,6 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const blacklist = require('../../json/blacklist.json');
module.exports = class KickCommand extends Command { module.exports = class KickCommand extends Command {
constructor(client) { constructor(client) {
super(client, { super(client, {

@ -1,4 +1,6 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const blacklist = require('../../json/blacklist.json');
module.exports = class PruneCommand extends Command { module.exports = class PruneCommand extends Command {
constructor(client) { constructor(client) {
super(client, { super(client, {

@ -1,6 +1,7 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const blacklist = require('../../json/blacklist.json'); const blacklist = require('../../json/blacklist.json');
const fs = require('fs'); const fs = require('fs');
module.exports = class CustomResponseCommand extends Command { module.exports = class CustomResponseCommand extends Command {
constructor(client) { constructor(client) {
super(client, { super(client, {

@ -1,4 +1,6 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const blacklist = require('../../json/blacklist.json');
module.exports = class UnbanCommand extends Command { module.exports = class UnbanCommand extends Command {
constructor(client) { constructor(client) {
super(client, { super(client, {

@ -2,6 +2,7 @@ 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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class AdviceCommand extends Command { module.exports = class AdviceCommand extends Command {

@ -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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class BadMemeCommand extends Command { module.exports = class BadMemeCommand extends Command {

@ -1,5 +1,6 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class clapCommand extends Command { module.exports = class clapCommand extends Command {
constructor(client) { constructor(client) {

@ -1,6 +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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class dankCommand extends Command { module.exports = class dankCommand extends Command {
constructor(client) { constructor(client) {

@ -4,6 +4,7 @@ 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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class DespacitoCommand extends Command { module.exports = class DespacitoCommand extends Command {
constructor(client) { constructor(client) {

@ -1,6 +1,7 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const emojiCharacters = require('../../emojiCharacters'); const emojiCharacters = require('../../emojiCharacters');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class emoteSayCommand extends Command { module.exports = class emoteSayCommand extends Command {
constructor(client) { constructor(client) {

@ -1,6 +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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class FunFactCommand extends Command { module.exports = class FunFactCommand extends Command {
constructor(client) { constructor(client) {

@ -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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class BadMemeCommand extends Command { module.exports = class BadMemeCommand extends Command {

@ -2,6 +2,8 @@ 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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class printCommand extends Command { module.exports = class printCommand extends Command {
constructor(client) { constructor(client) {
super(client, { super(client, {

@ -3,6 +3,7 @@ const Discord = require('discord.js');
const fetch = require('node-fetch'); const fetch = require('node-fetch');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const { prefix } = require('../../config.json') const { prefix } = require('../../config.json')
const blacklist = require('../../json/blacklist.json');
module.exports = class redditCommand extends Command { module.exports = class redditCommand extends Command {
constructor(client) { constructor(client) {

@ -1,5 +1,6 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class sayCommand extends Command { module.exports = class sayCommand extends Command {
constructor(client) { constructor(client) {

@ -1,5 +1,6 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class saydCommand extends Command { module.exports = class saydCommand extends Command {
constructor(client) { constructor(client) {

@ -3,6 +3,7 @@ const textToSpeech = require('@google-cloud/text-to-speech');
const gclient = new textToSpeech.TextToSpeechClient(); const gclient = new textToSpeech.TextToSpeechClient();
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const fs = require('fs'); const fs = require('fs');
const blacklist = require('../../json/blacklist.json');
module.exports = class BadMemeCommand extends Command { module.exports = class BadMemeCommand extends Command {

@ -3,6 +3,7 @@ const textToSpeech = require('@google-cloud/text-to-speech');
const gclient = new textToSpeech.TextToSpeechClient(); const gclient = new textToSpeech.TextToSpeechClient();
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const fs = require('fs'); const fs = require('fs');
const blacklist = require('../../json/blacklist.json');
module.exports = class ttsvcCommand extends Command { module.exports = class ttsvcCommand extends Command {

@ -3,6 +3,8 @@ 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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');

@ -3,6 +3,8 @@ 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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');

@ -3,6 +3,8 @@ 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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');

@ -3,6 +3,8 @@ 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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');

@ -3,6 +3,8 @@ 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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');

@ -3,6 +3,7 @@ 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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');

@ -3,6 +3,7 @@ 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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');

@ -1,5 +1,6 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class AvatarCommand extends Command { module.exports = class AvatarCommand extends Command {

@ -3,6 +3,8 @@ const fs = require('fs');
const youtubedl = require('youtube-dl'); const youtubedl = require('youtube-dl');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const { fbuser, fbpasswd } = require('../../config.json'); const { fbuser, fbpasswd } = require('../../config.json');
const blacklist = require('../../json/blacklist.json');
module.exports = class downloadCommand extends Command { module.exports = class downloadCommand extends Command {
constructor(client) { constructor(client) {

@ -1,6 +1,8 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const { feedbackChannel } = require('../../config.json'); const { feedbackChannel } = require('../../config.json');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
const fs = require('fs'); const fs = require('fs');
module.exports = class feedbackCommand extends Command { module.exports = class feedbackCommand extends Command {

@ -2,6 +2,8 @@ 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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class InfoCommand extends Command { module.exports = class InfoCommand extends Command {
constructor(client) { constructor(client) {

@ -1,6 +1,8 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const { supportServer } = require('../../config.json') const { supportServer } = require('../../config.json');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class InviteCommand extends Command { module.exports = class InviteCommand extends Command {
constructor(client) { constructor(client) {

@ -1,6 +1,8 @@
const { oneLine } = require('common-tags'); const { oneLine } = require('common-tags');
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class PingCommand extends Command { module.exports = class PingCommand extends Command {
constructor(client) { constructor(client) {

@ -1,5 +1,7 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class ServerCommand extends Command { module.exports = class ServerCommand extends Command {
constructor(client) { constructor(client) {

@ -1,5 +1,7 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class statsCommand extends Command { module.exports = class statsCommand extends Command {
constructor(client) { constructor(client) {

@ -1,5 +1,7 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class supportMeCommand extends Command { module.exports = class supportMeCommand extends Command {
constructor(client) { constructor(client) {

@ -1,7 +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 SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
const Discord = require('discord.js'); const Discord = require('discord.js');
const { yandexAPI } = require('../../config.json'); const { yandexAPI } = require('../../config.json');

@ -1,5 +1,7 @@
const { Command } = require('discord.js-commando'); const { Command } = require('discord.js-commando');
const SelfReloadJSON = require('self-reload-json'); const SelfReloadJSON = require('self-reload-json');
const blacklist = require('../../json/blacklist.json');
module.exports = class UpDootCommand extends Command { module.exports = class UpDootCommand extends Command {
constructor(client) { constructor(client) {

Loading…
Cancel
Save