You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Luno/events/messageReactionRemove.js

13 lines
729 B

3 years ago
module.exports = async (client, reaction, user) => {
if (reaction.partial) {try {await reaction.fetch();} catch {return;}}
if (user.bot) {return;}
if (reaction.message.guild && client.misc.queue[reaction.message.guild.id]
&& reaction.message.guild.members.cache.get(user.id).voice.channel
&& reaction.message.guild.members.cache.get(user.id).voice.channel.id === client.misc.queue[reaction.message.guild.id].channel
&& reaction.message.id === client.misc.queue[reaction.message.guild.id].controller.id
&& reaction.emoji.name === '⏯') {
await client.misc.queue[reaction.message.guild.id].player.pause(false);
require('../util/updatecontroller')(reaction.message, client);
}
};