mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Fixes
This commit is contained in:
parent
3aada93a80
commit
76f7658763
7 changed files with 13 additions and 13 deletions
6
backend/package-lock.json
generated
6
backend/package-lock.json
generated
|
@ -2371,9 +2371,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"knub": {
|
"knub": {
|
||||||
"version": "30.0.0-beta.25",
|
"version": "30.0.0-beta.26",
|
||||||
"resolved": "https://registry.npmjs.org/knub/-/knub-30.0.0-beta.25.tgz",
|
"resolved": "https://registry.npmjs.org/knub/-/knub-30.0.0-beta.26.tgz",
|
||||||
"integrity": "sha512-eYXHL16yqKokMnVdAfGEP4qG+y2Zl/4q9EH0a13xEwyo4lJRAFX5nCU23+B41088uWWbcI2YRccHRLA5F2kwtA==",
|
"integrity": "sha512-DGKpdhUiuz9+ga19rx4UBX8uWe3oYWHf79Oqgr/auDZVggJhMHZTnpt2cGVhlyOlp7cP/YRjNTxk2LeJI2ZWQw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"knub-command-manager": "^8.1.2",
|
"knub-command-manager": "^8.1.2",
|
||||||
"ts-essentials": "^6.0.7"
|
"ts-essentials": "^6.0.7"
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
"humanize-duration": "^3.15.0",
|
"humanize-duration": "^3.15.0",
|
||||||
"io-ts": "^2.0.0",
|
"io-ts": "^2.0.0",
|
||||||
"js-yaml": "^3.13.1",
|
"js-yaml": "^3.13.1",
|
||||||
"knub": "^30.0.0-beta.25",
|
"knub": "^30.0.0-beta.26",
|
||||||
"knub-command-manager": "^8.1.2",
|
"knub-command-manager": "^8.1.2",
|
||||||
"last-commit-log": "^2.1.0",
|
"last-commit-log": "^2.1.0",
|
||||||
"lodash.chunk": "^4.2.0",
|
"lodash.chunk": "^4.2.0",
|
||||||
|
|
|
@ -199,10 +199,10 @@ export const MutesCmd = mutesCmd({
|
||||||
|
|
||||||
const paginationReactionListener = pluginData.events.on(
|
const paginationReactionListener = pluginData.events.on(
|
||||||
"messageReactionAdd",
|
"messageReactionAdd",
|
||||||
({ args: { message: rMsg, emoji, userID } }) => {
|
({ args: { message: rMsg, emoji, member } }) => {
|
||||||
if (!isFullMessage(rMsg)) return;
|
if (!isFullMessage(rMsg)) return;
|
||||||
if (rMsg.id !== listMessage.id) return;
|
if (rMsg.id !== listMessage.id) return;
|
||||||
if (userID !== msg.author.id) return;
|
if (member.id !== msg.author.id) return;
|
||||||
if (!["⬅", "➡"].includes(emoji.name)) return;
|
if (!["⬅", "➡"].includes(emoji.name)) return;
|
||||||
|
|
||||||
if (emoji.name === "⬅" && currentPage > 1) {
|
if (emoji.name === "⬅" && currentPage > 1) {
|
||||||
|
@ -211,7 +211,7 @@ export const MutesCmd = mutesCmd({
|
||||||
drawListPage(currentPage + 1);
|
drawListPage(currentPage + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
rMsg.removeReaction(emoji.name, userID).catch(noop);
|
rMsg.removeReaction(emoji.name, member.id).catch(noop);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ export const AddReactionRoleEvt = reactionRolesEvt({
|
||||||
const pluginData = meta.pluginData;
|
const pluginData = meta.pluginData;
|
||||||
const msg = meta.args.message as Message;
|
const msg = meta.args.message as Message;
|
||||||
const emoji = meta.args.emoji;
|
const emoji = meta.args.emoji;
|
||||||
const userId = meta.args.userID;
|
const userId = meta.args.member.id;
|
||||||
|
|
||||||
if (userId === pluginData.client.user.id) {
|
if (userId === pluginData.client.user.id) {
|
||||||
// Don't act on own reactions
|
// Don't act on own reactions
|
||||||
|
|
|
@ -10,7 +10,7 @@ export const StarboardReactionAddEvt = starboardEvt({
|
||||||
const pluginData = meta.pluginData;
|
const pluginData = meta.pluginData;
|
||||||
|
|
||||||
let msg = meta.args.message as Message;
|
let msg = meta.args.message as Message;
|
||||||
const userId = meta.args.userID;
|
const userId = meta.args.member.id;
|
||||||
const emoji = meta.args.emoji;
|
const emoji = meta.args.emoji;
|
||||||
|
|
||||||
if (!msg.author) {
|
if (!msg.author) {
|
||||||
|
|
|
@ -4,7 +4,7 @@ export const StarboardReactionRemoveEvt = starboardEvt({
|
||||||
event: "messageReactionRemove",
|
event: "messageReactionRemove",
|
||||||
|
|
||||||
async listener(meta) {
|
async listener(meta) {
|
||||||
await meta.pluginData.state.starboardReactions.deleteStarboardReaction(meta.args.message.id, meta.args.userID);
|
await meta.pluginData.state.starboardReactions.deleteStarboardReaction(meta.args.message.id, meta.args.member.id);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -137,9 +137,9 @@ export async function displaySearch(
|
||||||
searchMsg.addReaction("➡");
|
searchMsg.addReaction("➡");
|
||||||
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 (rMsg.id !== searchMsg.id) return;
|
||||||
if (userID !== msg.author.id) return;
|
if (member.id !== msg.author.id) return;
|
||||||
if (!["⬅", "➡", "🔄"].includes(emoji.name)) return;
|
if (!["⬅", "➡", "🔄"].includes(emoji.name)) return;
|
||||||
|
|
||||||
if (emoji.name === "⬅" && currentPage > 1) {
|
if (emoji.name === "⬅" && currentPage > 1) {
|
||||||
|
@ -151,7 +151,7 @@ export async function displaySearch(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isFullMessage(rMsg)) {
|
if (isFullMessage(rMsg)) {
|
||||||
rMsg.removeReaction(emoji.name, userID);
|
rMsg.removeReaction(emoji.name, member.id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue