mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
refactor(*): remove unused exception variables (#193)
This commit is contained in:
parent
38ab38645b
commit
a4a7eb41b0
29 changed files with 35 additions and 35 deletions
|
@ -69,7 +69,7 @@ export const ForcebanCmd = modActionsCmd({
|
|||
try {
|
||||
// FIXME: Use banUserId()?
|
||||
await pluginData.guild.banMember(user.id, 1, reason != null ? encodeURIComponent(reason) : undefined);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
sendErrorMessage(pluginData, msg.channel, "Failed to forceban member");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ export const MassbanCmd = modActionsCmd({
|
|||
});
|
||||
|
||||
pluginData.state.events.emit("ban", userId, banReason);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
failedBans.push(userId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ export const MassunbanCmd = modActionsCmd({
|
|||
reason: `Mass unban: ${unbanReason}`,
|
||||
postInCaseLogOverride: false,
|
||||
});
|
||||
} catch (e) {
|
||||
} catch {
|
||||
failedUnbans.push({ userId, reason: UnbanFailReasons.UNBAN_FAILED });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ export const UnbanCmd = modActionsCmd({
|
|||
try {
|
||||
ignoreEvent(pluginData, IgnoredEventType.Unban, user.id);
|
||||
await pluginData.guild.unbanMember(user.id, reason != null ? encodeURIComponent(reason) : undefined);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
sendErrorMessage(pluginData, msg.channel, "Failed to unban member; are you sure they're banned?");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ export async function actualKickMemberCmd(
|
|||
|
||||
try {
|
||||
await memberToKick.ban(1, encodeURIComponent("kick -clean"));
|
||||
} catch (e) {
|
||||
} catch {
|
||||
sendErrorMessage(pluginData, msg.channel, "Failed to ban the user to clean messages (-clean)");
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ export async function actualKickMemberCmd(
|
|||
|
||||
try {
|
||||
await pluginData.guild.unbanMember(memberToKick.id, encodeURIComponent("kick -clean"));
|
||||
} catch (e) {
|
||||
} catch {
|
||||
sendErrorMessage(pluginData, msg.channel, "Failed to unban the user after banning them (-clean)");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue