This commit is contained in:
Dragory 2020-10-16 02:13:54 +03:00
parent 3aada93a80
commit 76f7658763
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
7 changed files with 13 additions and 13 deletions

View file

@ -137,9 +137,9 @@ export async function displaySearch(
searchMsg.addReaction("➡");
searchMsg.addReaction("🔄");
const listenerFn = pluginData.events.on("messageReactionAdd", ({ args: { message: rMsg, emoji, userID } }) => {
const listenerFn = pluginData.events.on("messageReactionAdd", ({ args: { message: rMsg, emoji, member } }) => {
if (rMsg.id !== searchMsg.id) return;
if (userID !== msg.author.id) return;
if (member.id !== msg.author.id) return;
if (!["⬅", "➡", "🔄"].includes(emoji.name)) return;
if (emoji.name === "⬅" && currentPage > 1) {
@ -151,7 +151,7 @@ export async function displaySearch(
}
if (isFullMessage(rMsg)) {
rMsg.removeReaction(emoji.name, userID);
rMsg.removeReaction(emoji.name, member.id);
}
});