This commit is contained in:
Loïc Bersier 2019-07-05 19:04:16 +02:00
commit 082bc340b3
6 changed files with 143 additions and 149 deletions

View file

@ -43,7 +43,8 @@ class tweetCommand extends Command {
return message.channel.send('You have been blacklisted from this command... be less naughty next time.');
}
let text = args.text;
// remove zero width space
let text = args.text.replace('', '');
if (!text)
return;
@ -70,7 +71,7 @@ class tweetCommand extends Command {
.setAuthor(message.author.username, message.author.displayAvatarURL())
.setDescription(args.text)
.addField('Link', `https://twitter.com/HahaYesDB/status/${tweetid}`)
.setFooter(`Tweet ID: ${tweetid} | Author ID: ${message.author.id}`)
.setFooter(`Tweet ID: ${tweetid} | Author ID: ${message.author.id} | Guild ID: ${message.guild.id}`)
.setTimestamp();
channel.send({embed: Embed});

View file

@ -8,7 +8,7 @@ class BlacklistInhibitor extends Inhibitor {
}
async exec(message) {
const blacklist = ['501856229123948545', '497730155691638784', '29476879240658944', '294768792406589440'];
const blacklist = ['501856229123948545', '497730155691638784', '29476879240658944', '294768792406589440', '530399670728392737', '595102888796356628'];
return blacklist.includes(message.author.id);
}
}

View file

@ -8,7 +8,7 @@ class serverblacklistInhibitor extends Inhibitor {
}
async exec(message) {
const blacklist = [];
const blacklist = ['595100178915262464'];
return blacklist.includes(message.guild.id);
}
}

View file

@ -42,11 +42,9 @@ class messageListener extends Listener {
}
}
// User autoresponse
if (fs.existsSync(`./tag/${message.guild.id}.json`)) {
let customresponse = require(`../../tag/${message.guild.id}.json`);
let customresponse = reload(`../../tag/${message.guild.id}.json`);
try {
if(customresponse[message_content]) {
let text = customresponse[message_content];
if (text.includes('[ban]')) {
@ -174,15 +172,8 @@ class messageListener extends Listener {
return message.channel.send(text);
}
}
} catch (err) {
null;
}
}
}
}
}

View file

@ -15,19 +15,14 @@ class MessageReactionAddListener extends Listener {
async exec(reaction, user) {
if (reaction.message.author == user) return;
let starboardChannel, shameboardChannel, staremote, starcount, shameemote, shamecount;
let messageContent = reaction.message.content;
let messageAttachments = reaction.message.attachments.map(u=> u.url);
if (fs.existsSync(`./board/star${reaction.message.guild.id}.json`)) {
starboardChannel = require(`../../board/star${reaction.message.guild.id}.json`);
staremote = starboardChannel['emote'];
starcount = starboardChannel['count'];
}
if (fs.existsSync(`./board/shame${reaction.message.guild.id}.json`)) {
shameboardChannel = require(`../../board/shame${reaction.message.guild.id}.json`);
shameemote = shameboardChannel['emote'];
shamecount = shameboardChannel['count'];
}
let messageContent = reaction.message.content;
let messageAttachments = reaction.message.attachments.map(u=> u.url);
// Starboard
if (reaction.emoji.name == staremote && reaction.count == starcount) {
@ -38,6 +33,12 @@ class MessageReactionAddListener extends Listener {
sendEmbed('starboard', staremote, this.client);
}
}
if (fs.existsSync(`./board/shame${reaction.message.guild.id}.json`)) {
shameboardChannel = require(`../../board/shame${reaction.message.guild.id}.json`);
shameemote = shameboardChannel['emote'];
shamecount = shameboardChannel['count'];
//Shameboard
if (reaction.emoji.name == shameemote && reaction.count == shamecount) {
@ -48,6 +49,7 @@ class MessageReactionAddListener extends Listener {
sendEmbed('shameboard', shameemote, this.client);
}
}
function sendEmbed(name, emote, client) {
let channel;

View file

@ -1 +1 @@
["217043728127229953", "153320466134728705", "483373304162287626", "383804893154115586", "541860755700449290", "411207629533347850", "549419255511253003", "241374139745566730", "439158164433141773", "214860284446244864", "329390383131787274", "215681880899584000", "223279666067275776", "94879945473392640", "408282444597297152", "175799889089789952", "262054068002750465"]
["217043728127229953", "153320466134728705", "483373304162287626", "383804893154115586", "541860755700449290", "411207629533347850", "549419255511253003", "241374139745566730", "439158164433141773", "214860284446244864", "329390383131787274", "215681880899584000", "223279666067275776", "94879945473392640", "408282444597297152", "175799889089789952", "262054068002750465", "530399670728392737", "427889181121839106"]