forked from Supositware/Haha-Yes
fixed the command not working
This commit is contained in:
parent
4ceb666727
commit
ee8957913f
1 changed files with 24 additions and 22 deletions
|
@ -15,19 +15,14 @@ class MessageReactionAddListener extends Listener {
|
||||||
async exec(reaction, user) {
|
async exec(reaction, user) {
|
||||||
if (reaction.message.author == user) return;
|
if (reaction.message.author == user) return;
|
||||||
let starboardChannel, shameboardChannel, staremote, starcount, shameemote, shamecount;
|
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`)) {
|
if (fs.existsSync(`./board/star${reaction.message.guild.id}.json`)) {
|
||||||
starboardChannel = require(`../../board/star${reaction.message.guild.id}.json`);
|
starboardChannel = require(`../../board/star${reaction.message.guild.id}.json`);
|
||||||
staremote = starboardChannel['emote'];
|
staremote = starboardChannel['emote'];
|
||||||
starcount = starboardChannel['count'];
|
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
|
// Starboard
|
||||||
if (reaction.emoji.name == staremote && reaction.count == starcount) {
|
if (reaction.emoji.name == staremote && reaction.count == starcount) {
|
||||||
|
@ -38,6 +33,12 @@ class MessageReactionAddListener extends Listener {
|
||||||
|
|
||||||
sendEmbed('starboard', staremote, this.client);
|
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
|
//Shameboard
|
||||||
if (reaction.emoji.name == shameemote && reaction.count == shamecount) {
|
if (reaction.emoji.name == shameemote && reaction.count == shamecount) {
|
||||||
|
@ -48,6 +49,7 @@ class MessageReactionAddListener extends Listener {
|
||||||
|
|
||||||
sendEmbed('shameboard', shameemote, this.client);
|
sendEmbed('shameboard', shameemote, this.client);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function sendEmbed(name, emote, client) {
|
function sendEmbed(name, emote, client) {
|
||||||
let channel;
|
let channel;
|
||||||
|
|
Loading…
Reference in a new issue