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:
parent
595e1a0556
commit
09eb8e92f2
189 changed files with 1244 additions and 900 deletions
|
@ -1,6 +1,6 @@
|
|||
import { waitForReply } from "knub/helpers";
|
||||
import { commandTypeHelpers as ct } from "../../../../commandTypes.js";
|
||||
import { getContextChannel, sendContextResponse } from "../../../../pluginUtils.js";
|
||||
import { getContextChannel, resolveMessageMember, sendContextResponse } from "../../../../pluginUtils.js";
|
||||
import { modActionsMsgCmd } from "../../types.js";
|
||||
import { actualMassUnbanCmd } from "./actualMassUnbanCmd.js";
|
||||
|
||||
|
@ -17,14 +17,15 @@ export const MassUnbanMsgCmd = modActionsMsgCmd({
|
|||
|
||||
async run({ pluginData, message: msg, args }) {
|
||||
// Ask for unban reason (cleaner this way instead of trying to cram it into the args)
|
||||
sendContextResponse(msg, "Unban reason? `cancel` to cancel");
|
||||
const unbanReasonReply = await waitForReply(pluginData.client, await getContextChannel(msg), msg.author.id);
|
||||
msg.reply("Unban reason? `cancel` to cancel");
|
||||
const unbanReasonReply = await waitForReply(pluginData.client, msg.channel, msg.author.id);
|
||||
if (!unbanReasonReply || !unbanReasonReply.content || unbanReasonReply.content.toLowerCase().trim() === "cancel") {
|
||||
pluginData.state.common.sendErrorMessage(msg, "Cancelled");
|
||||
return;
|
||||
}
|
||||
|
||||
actualMassUnbanCmd(pluginData, msg, args.userIds, msg.member, unbanReasonReply.content, [
|
||||
const member = await resolveMessageMember(msg);
|
||||
actualMassUnbanCmd(pluginData, msg, args.userIds, member, unbanReasonReply.content, [
|
||||
...unbanReasonReply.attachments.values(),
|
||||
]);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue