mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
upgrade discord.js
This commit is contained in:
parent
036d46f08a
commit
3537305c59
32 changed files with 232 additions and 107 deletions
|
@ -60,7 +60,7 @@ export const AddCaseCmd = modActionsCmd({
|
|||
return;
|
||||
}
|
||||
|
||||
const reason = formatReasonWithAttachments(args.reason, msg.attachments.array());
|
||||
const reason = formatReasonWithAttachments(args.reason, [...msg.attachments.values()]);
|
||||
|
||||
// Create the case
|
||||
const casesPlugin = pluginData.getPlugin(CasesPlugin);
|
||||
|
|
|
@ -51,7 +51,7 @@ export const BanCmd = modActionsCmd({
|
|||
}
|
||||
const time = args["time"] ? args["time"] : null;
|
||||
|
||||
const reason = formatReasonWithAttachments(args.reason, msg.attachments.array());
|
||||
const reason = formatReasonWithAttachments(args.reason, [...msg.attachments.values()]);
|
||||
const memberToBan = await resolveMember(pluginData.client, pluginData.guild, user.id);
|
||||
// The moderator who did the action is the message author or, if used, the specified -mod
|
||||
let mod = msg.member;
|
||||
|
|
|
@ -61,7 +61,7 @@ export const ForcebanCmd = modActionsCmd({
|
|||
mod = args.mod;
|
||||
}
|
||||
|
||||
const reason = formatReasonWithAttachments(args.reason, msg.attachments.array());
|
||||
const reason = formatReasonWithAttachments(args.reason, [...msg.attachments.values()]);
|
||||
|
||||
ignoreEvent(pluginData, IgnoredEventType.Ban, user.id);
|
||||
pluginData.state.serverLogs.ignoreLog(LogType.MEMBER_BAN, user.id);
|
||||
|
|
|
@ -39,7 +39,7 @@ export const MassbanCmd = modActionsCmd({
|
|||
return;
|
||||
}
|
||||
|
||||
const banReason = formatReasonWithAttachments(banReasonReply.content, msg.attachments.array());
|
||||
const banReason = formatReasonWithAttachments(banReasonReply.content, [...msg.attachments.values()]);
|
||||
|
||||
// Verify we can act on each of the users specified
|
||||
for (const userId of args.userIds) {
|
||||
|
|
|
@ -37,7 +37,7 @@ export const MassunbanCmd = modActionsCmd({
|
|||
return;
|
||||
}
|
||||
|
||||
const unbanReason = formatReasonWithAttachments(unbanReasonReply.content, msg.attachments.array());
|
||||
const unbanReason = formatReasonWithAttachments(unbanReasonReply.content, [...msg.attachments.values()]);
|
||||
|
||||
// Ignore automatic unban cases and logs for these users
|
||||
// We'll create our own cases below and post a single "mass unbanned" log instead
|
||||
|
|
|
@ -39,7 +39,7 @@ export const MassmuteCmd = modActionsCmd({
|
|||
return;
|
||||
}
|
||||
|
||||
const muteReason = formatReasonWithAttachments(muteReasonReceived.content, msg.attachments.array());
|
||||
const muteReason = formatReasonWithAttachments(muteReasonReceived.content, [...msg.attachments.values()]);
|
||||
|
||||
// Verify we can act upon all users
|
||||
for (const userId of args.userIds) {
|
||||
|
|
|
@ -31,7 +31,7 @@ export const NoteCmd = modActionsCmd({
|
|||
}
|
||||
|
||||
const userName = user.tag;
|
||||
const reason = formatReasonWithAttachments(args.note, msg.attachments.array());
|
||||
const reason = formatReasonWithAttachments(args.note, [...msg.attachments.values()]);
|
||||
|
||||
const casesPlugin = pluginData.getPlugin(CasesPlugin);
|
||||
const createdCase = await casesPlugin.createCase({
|
||||
|
|
|
@ -47,7 +47,7 @@ export const UnbanCmd = modActionsCmd({
|
|||
}
|
||||
|
||||
pluginData.state.serverLogs.ignoreLog(LogType.MEMBER_UNBAN, user.id);
|
||||
const reason = formatReasonWithAttachments(args.reason, msg.attachments.array());
|
||||
const reason = formatReasonWithAttachments(args.reason, [...msg.attachments.values()]);
|
||||
|
||||
try {
|
||||
ignoreEvent(pluginData, IgnoredEventType.Unban, user.id);
|
||||
|
|
|
@ -63,7 +63,7 @@ export const WarnCmd = modActionsCmd({
|
|||
}
|
||||
|
||||
const config = pluginData.config.get();
|
||||
const reason = formatReasonWithAttachments(args.reason, msg.attachments.array());
|
||||
const reason = formatReasonWithAttachments(args.reason, [...msg.attachments.values()]);
|
||||
|
||||
const casesPlugin = pluginData.getPlugin(CasesPlugin);
|
||||
const priorWarnAmount = await casesPlugin.getCaseTypeAmountForUserId(memberToWarn.id, CaseTypes.Warn);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue