3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-06-07 16:05:01 +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 { readContactMethodsFromArgs } from "../../functions/readContactMethodsFromArgs.js";
import { modActionsMsgCmd } from "../../types.js";
@ -39,16 +39,17 @@ export const ForceMuteMsgCmd = modActionsMsgCmd({
return;
}
const authorMember = await resolveMessageMember(msg)
const memberToMute = await resolveMember(pluginData.client, pluginData.guild, user.id);
// Make sure we're allowed to mute this user
if (memberToMute && !canActOn(pluginData, msg.member, memberToMute)) {
if (memberToMute && !canActOn(pluginData, authorMember, memberToMute)) {
pluginData.state.common.sendErrorMessage(msg, "Cannot mute: 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) {