3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-06 18:47:20 +00:00

add missing catch noops

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Tiago R 2023-12-28 14:40:13 +00:00 committed by GitHub
parent a8f9ed1372
commit e15027fb47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -13,6 +13,7 @@ import { TemplateSafeValueContainer, renderTemplate } from "../../../templateFor
import {
UserNotificationMethod,
UserNotificationResult,
noop,
notifyUser,
resolveMember,
resolveUser,
@ -134,7 +135,7 @@ export async function muteUser(
throw new RecoverablePluginError(ERRORS.USER_NOT_MODERATABLE, pluginData.guild);
}
await member.disableCommunicationUntil(timeoutUntil);
await member.disableCommunicationUntil(timeoutUntil).catch(noop);
}
// If enabled, move the user to the mute voice channel (e.g. afk - just to apply the voice perms from the mute role)

View file

@ -5,7 +5,7 @@ import { CaseTypes } from "../../../data/CaseTypes";
import { AddMuteParams } from "../../../data/GuildMutes";
import { MuteTypes } from "../../../data/MuteTypes";
import { Mute } from "../../../data/entities/Mute";
import { resolveMember, resolveUser } from "../../../utils";
import { noop, resolveMember, resolveUser } from "../../../utils";
import { CasesPlugin } from "../../Cases/CasesPlugin";
import { CaseArgs } from "../../Cases/types";
import { LogsPlugin } from "../../Logs/LogsPlugin";
@ -57,7 +57,7 @@ export async function unmuteUser(
if (member && (existingMute?.type === MuteTypes.Timeout || createdMute?.type === MuteTypes.Timeout)) {
if (!member.moderatable) return null;
await member.disableCommunicationUntil(timeoutExpiresAt);
await member.disableCommunicationUntil(timeoutExpiresAt).catch(noop);
await pluginData.state.mutes.updateTimeoutExpiresAt(userId, timeoutExpiresAt);
}
} else {