3
0
Fork 0
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:
almeidx 2021-08-04 20:45:42 +01:00
parent 036d46f08a
commit 3537305c59
No known key found for this signature in database
GPG key ID: 8558FBFF849BD664
32 changed files with 232 additions and 107 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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);

View file

@ -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) {

View file

@ -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

View file

@ -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) {

View file

@ -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({

View file

@ -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);

View file

@ -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);