reload blacklist
This commit is contained in:
parent
e3b464f119
commit
62af8f170a
1 changed files with 2 additions and 1 deletions
|
@ -2,7 +2,7 @@ const { Command } = require('discord-akairo');
|
||||||
const Twitter = require('twitter-lite');
|
const Twitter = require('twitter-lite');
|
||||||
const rand = require('../../rand.js');
|
const rand = require('../../rand.js');
|
||||||
const { twiConsumer, twiConsumerSecret, twiToken, twiTokenSecret, twiChannel } = require('../../config.json');
|
const { twiConsumer, twiConsumerSecret, twiToken, twiTokenSecret, twiChannel } = require('../../config.json');
|
||||||
const blacklist = require('../../json/twiBlacklist.json');
|
const reload = require('auto-reload');
|
||||||
|
|
||||||
class tweetCommand extends Command {
|
class tweetCommand extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -27,6 +27,7 @@ class tweetCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
|
const blacklist = reload('../../json/twiBlacklist.json');
|
||||||
const channel = this.client.channels.get(twiChannel);
|
const channel = this.client.channels.get(twiChannel);
|
||||||
|
|
||||||
if (blacklist.includes(message.author.id)) {
|
if (blacklist.includes(message.author.id)) {
|
||||||
|
|
Loading…
Reference in a new issue