mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-16 22:55:03 +00:00
Revert "Global unban for main server"
This commit is contained in:
parent
83d6bc86ce
commit
ba548dbf0c
3 changed files with 1 additions and 10 deletions
|
@ -51,7 +51,6 @@ import { ModActionsPluginType, zModActionsConfig } from "./types";
|
||||||
|
|
||||||
const defaultOptions = {
|
const defaultOptions = {
|
||||||
config: {
|
config: {
|
||||||
main_guild: null,
|
|
||||||
dm_on_warn: true,
|
dm_on_warn: true,
|
||||||
dm_on_kick: false,
|
dm_on_kick: false,
|
||||||
dm_on_ban: false,
|
dm_on_ban: false,
|
||||||
|
|
|
@ -47,19 +47,12 @@ export const UnbanCmd = modActionsCmd({
|
||||||
mod = args.mod;
|
mod = args.mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
const config = pluginData.config.get();
|
|
||||||
const guild = pluginData.client.guilds.cache.get(config.main_guild as Snowflake);
|
|
||||||
if (!guild) {
|
|
||||||
sendErrorMessage(pluginData, msg.channel, "Main guild not found!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
pluginData.state.serverLogs.ignoreLog(LogType.MEMBER_UNBAN, user.id);
|
pluginData.state.serverLogs.ignoreLog(LogType.MEMBER_UNBAN, user.id);
|
||||||
const reason = formatReasonWithAttachments(args.reason, [...msg.attachments.values()]);
|
const reason = formatReasonWithAttachments(args.reason, [...msg.attachments.values()]);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ignoreEvent(pluginData, IgnoredEventType.Unban, user.id);
|
ignoreEvent(pluginData, IgnoredEventType.Unban, user.id);
|
||||||
await guild.bans.remove(user.id as Snowflake, reason ?? undefined);
|
await pluginData.guild.bans.remove(user.id as Snowflake, reason ?? undefined);
|
||||||
} catch {
|
} catch {
|
||||||
sendErrorMessage(pluginData, msg.channel, "Failed to unban member; are you sure they're banned?");
|
sendErrorMessage(pluginData, msg.channel, "Failed to unban member; are you sure they're banned?");
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -12,7 +12,6 @@ import { UserNotificationMethod, UserNotificationResult } from "../../utils";
|
||||||
import { CaseArgs } from "../Cases/types";
|
import { CaseArgs } from "../Cases/types";
|
||||||
|
|
||||||
export const zModActionsConfig = z.strictObject({
|
export const zModActionsConfig = z.strictObject({
|
||||||
main_guild: z.nullable(z.string()),
|
|
||||||
dm_on_warn: z.boolean(),
|
dm_on_warn: z.boolean(),
|
||||||
dm_on_kick: z.boolean(),
|
dm_on_kick: z.boolean(),
|
||||||
dm_on_ban: z.boolean(),
|
dm_on_ban: z.boolean(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue