3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-06-08 08:05:03 +00:00

feat: update to djs 14.19.3, node 22, zod 4

This commit is contained in:
Dragory 2025-05-22 22:35:48 +00:00
parent 595e1a0556
commit 09eb8e92f2
No known key found for this signature in database
189 changed files with 1244 additions and 900 deletions

View file

@ -1,5 +1,5 @@
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
import { canActOn, hasPermission } from "../../../../pluginUtils.js";
import { canActOn, hasPermission, resolveMessageMember } from "../../../../pluginUtils.js";
import { resolveMember, resolveUser } from "../../../../utils.js";
import { modActionsMsgCmd } from "../../types.js";
import { actualUnmuteCmd } from "../unmute/actualUnmuteCmd.js";
@ -42,17 +42,17 @@ export const ForceUnmuteMsgCmd = modActionsMsgCmd({
return;
}
// Find the server member to unmute
const authorMember = await resolveMessageMember(msg);
const memberToUnmute = await resolveMember(pluginData.client, pluginData.guild, user.id);
// Make sure we're allowed to unmute this member
if (memberToUnmute && !canActOn(pluginData, msg.member, memberToUnmute)) {
if (memberToUnmute && !canActOn(pluginData, authorMember, memberToUnmute)) {
pluginData.state.common.sendErrorMessage(msg, "Cannot unmute: insufficient permissions");
return;
}
// The moderator who did the action is the message author or, if used, the specified -mod
let mod = msg.member;
let mod = authorMember;
let ppId: string | undefined;
if (args.mod) {