|
|
|
@ -14,15 +14,18 @@ class MessageReactionAddListener extends Listener {
|
|
|
|
|
async exec(reaction) {
|
|
|
|
|
let messageContent = reaction.message.content;
|
|
|
|
|
let messageAttachments = reaction.message.attachments.map(u=> `${u.url}`);
|
|
|
|
|
let starboardChannel = reload(`../../board/star${reaction.message.guild.id}.json`);
|
|
|
|
|
|
|
|
|
|
let staremote = starboardChannel['emote'];
|
|
|
|
|
let starcount = starboardChannel['count'];
|
|
|
|
|
|
|
|
|
|
// Starboard
|
|
|
|
|
if (reaction.emoji.name === '🌟' && reaction.count === 4) {
|
|
|
|
|
if (reaction.emoji.name == staremote && reaction.count == starcount) {
|
|
|
|
|
if (messageID.includes(reaction.message.id))
|
|
|
|
|
return console.log('Message already in starboard!');
|
|
|
|
|
|
|
|
|
|
messageID.push(reaction.message.id);
|
|
|
|
|
|
|
|
|
|
let starboardChannel = reload(`../../board/star${reaction.message.guild.id}.json`);
|
|
|
|
|
const channel = this.client.channels.get(starboardChannel['starboard']);
|
|
|
|
|
|
|
|
|
|
if (!messageContent)
|
|
|
|
@ -37,14 +40,21 @@ class MessageReactionAddListener extends Listener {
|
|
|
|
|
channel.send({ embed: starEmbed});
|
|
|
|
|
return channel.send(`in: ${reaction.message.channel} ID: ${reaction.message.id} \n${messageAttachments}`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let shameboardChannel = reload(`../../board/shame${reaction.message.guild.id}.json`);
|
|
|
|
|
|
|
|
|
|
let shameemote = shameboardChannel['emote'];
|
|
|
|
|
let shamecount = shameboardChannel['count'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Shameboard
|
|
|
|
|
if (reaction.emoji.name === '✡' && reaction.count === 4) {
|
|
|
|
|
if (reaction.emoji.name == shameemote && reaction.count == shamecount) {
|
|
|
|
|
if (messageID.includes(reaction.message.id))
|
|
|
|
|
return console.log('Message already in starboard!');
|
|
|
|
|
|
|
|
|
|
messageID.push(reaction.message.id);
|
|
|
|
|
|
|
|
|
|
let shameboardChannel = reload(`../../board/shame${reaction.message.guild.id}.json`);
|
|
|
|
|
const channel = this.client.channels.get(shameboardChannel['shameboard']);
|
|
|
|
|
|
|
|
|
|
if (!messageContent)
|
|
|
|
|