3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Formatting and initial ButtonRoles DB work

This commit is contained in:
Dark 2021-06-08 02:23:30 +02:00
parent 6ac9d2f2a2
commit 5efdf5ce95
No known key found for this signature in database
GPG key ID: 2CD6ACB6B0A87B8A
108 changed files with 253 additions and 303 deletions

View file

@ -46,7 +46,6 @@ import { updateCase } from "./functions/updateCase";
import { warnMember } from "./functions/warnMember";
import { BanOptions, ConfigSchema, KickOptions, ModActionsPluginType, WarnOptions } from "./types";
const defaultOptions = {
config: {
dm_on_warn: true,

View file

@ -9,7 +9,6 @@ import { getGuildPrefix } from "../../../utils/getGuildPrefix";
import { CasesPlugin } from "../../Cases/CasesPlugin";
import { modActionsCmd } from "../types";
const opts = {
mod: ct.userId({ option: true }),
};

View file

@ -3,15 +3,12 @@ import { commandTypeHelpers as ct } from "../../../commandTypes";
import { CaseTypes } from "../../../data/CaseTypes";
import { CasesPlugin } from "../../../plugins/Cases/CasesPlugin";
import { sendErrorMessage } from "../../../pluginUtils";
import {
chunkArray, emptyEmbedValue, resolveUser, trimLines, UnknownUser
} from "../../../utils";
import { chunkArray, emptyEmbedValue, resolveUser, trimLines, UnknownUser } from "../../../utils";
import { asyncMap } from "../../../utils/async";
import { getChunkedEmbedFields } from "../../../utils/getChunkedEmbedFields";
import { getGuildPrefix } from "../../../utils/getGuildPrefix";
import { modActionsCmd } from "../types";
const opts = {
expand: ct.bool({ option: true, isSwitch: true, shortcut: "e" }),
hidden: ct.bool({ option: true, isSwitch: true, shortcut: "h" }),

View file

@ -10,7 +10,6 @@ import { LogsPlugin } from "../../Logs/LogsPlugin";
import { TimeAndDatePlugin } from "../../TimeAndDate/TimeAndDatePlugin";
import { modActionsCmd } from "../types";
export const DeleteCaseCmd = modActionsCmd({
trigger: ["delete_case", "deletecase"],
permission: "can_deletecase",

View file

@ -12,7 +12,6 @@ import { formatReasonWithAttachments } from "../functions/formatReasonWithAttach
import { ignoreEvent } from "../functions/ignoreEvent";
import { IgnoredEventType, modActionsCmd } from "../types";
export const MassbanCmd = modActionsCmd({
trigger: "massban",
permission: "can_massban",

View file

@ -11,7 +11,6 @@ import { ignoreEvent } from "../functions/ignoreEvent";
import { isBanned } from "../functions/isBanned";
import { IgnoredEventType, modActionsCmd } from "../types";
export const MassunbanCmd = modActionsCmd({
trigger: "massunban",
permission: "can_massunban",

View file

@ -9,7 +9,6 @@ import { stripObjectToScalars } from "../../../utils";
import { formatReasonWithAttachments } from "../functions/formatReasonWithAttachments";
import { modActionsCmd } from "../types";
export const MassmuteCmd = modActionsCmd({
trigger: "massmute",
permission: "can_massmute",

View file

@ -6,7 +6,6 @@ import { actualMuteUserCmd } from "../functions/actualMuteUserCmd";
import { isBanned } from "../functions/isBanned";
import { modActionsCmd } from "../types";
const opts = {
mod: ct.member({ option: true }),
notify: ct.string({ option: true }),

View file

@ -9,7 +9,6 @@ import { clearIgnoredEvents } from "../functions/clearIgnoredEvents";
import { isEventIgnored } from "../functions/isEventIgnored";
import { IgnoredEventType, modActionsEvt } from "../types";
/**
* Create a BAN case automatically when a user is banned manually.
* Attempts to find the ban's details in the audit log.

View file

@ -10,7 +10,6 @@ import { clearIgnoredEvents } from "../functions/clearIgnoredEvents";
import { isEventIgnored } from "../functions/isEventIgnored";
import { IgnoredEventType, modActionsEvt } from "../types";
/**
* Create a KICK case automatically when a user is kicked manually.
* Attempts to find the kick's details in the audit log.

View file

@ -9,7 +9,6 @@ import { clearIgnoredEvents } from "../functions/clearIgnoredEvents";
import { isEventIgnored } from "../functions/isEventIgnored";
import { IgnoredEventType, modActionsEvt } from "../types";
/**
* Create an UNBAN case automatically when a user is unbanned manually.
* Attempts to find the unban's details in the audit log.

View file

@ -5,7 +5,6 @@ import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
import { LogsPlugin } from "../../Logs/LogsPlugin";
import { modActionsEvt } from "../types";
/**
* Show an alert if a member with prior notes joins the server
*/

View file

@ -7,7 +7,6 @@ import { asSingleLine, UnknownUser } from "../../../utils";
import { ModActionsPluginType } from "../types";
import { formatReasonWithAttachments } from "./formatReasonWithAttachments";
export async function actualUnmuteCmd(
pluginData: GuildPluginData<ModActionsPluginType>,
user: User | UnknownUser,

View file

@ -6,19 +6,18 @@ import { LogType } from "../../../data/LogType";
import { logger } from "../../../logger";
import { renderTemplate } from "../../../templateFormatter";
import {
createUserNotificationError,
notifyUser,
resolveUser,
stripObjectToScalars,
ucfirst,
UserNotificationResult
createUserNotificationError,
notifyUser,
resolveUser,
stripObjectToScalars,
ucfirst,
UserNotificationResult,
} from "../../../utils";
import { CasesPlugin } from "../../Cases/CasesPlugin";
import { BanOptions, BanResult, IgnoredEventType, ModActionsPluginType } from "../types";
import { getDefaultContactMethods } from "./getDefaultContactMethods";
import { ignoreEvent } from "./ignoreEvent";
/**
* Ban the specified user id, whether or not they're actually on the server at the time. Generates a case.
*/

View file

@ -4,19 +4,18 @@ import { CaseTypes } from "../../../data/CaseTypes";
import { LogType } from "../../../data/LogType";
import { renderTemplate } from "../../../templateFormatter";
import {
createUserNotificationError,
notifyUser,
resolveUser,
stripObjectToScalars,
ucfirst,
UserNotificationResult
createUserNotificationError,
notifyUser,
resolveUser,
stripObjectToScalars,
ucfirst,
UserNotificationResult,
} from "../../../utils";
import { CasesPlugin } from "../../Cases/CasesPlugin";
import { IgnoredEventType, KickOptions, KickResult, ModActionsPluginType } from "../types";
import { getDefaultContactMethods } from "./getDefaultContactMethods";
import { ignoreEvent } from "./ignoreEvent";
/**
* Kick the specified server member. Generates a case.
*/

View file

@ -4,19 +4,18 @@ import { CaseTypes } from "../../../data/CaseTypes";
import { LogType } from "../../../data/LogType";
import { renderTemplate } from "../../../templateFormatter";
import {
createUserNotificationError,
notifyUser,
resolveUser,
stripObjectToScalars,
ucfirst,
UserNotificationResult
createUserNotificationError,
notifyUser,
resolveUser,
stripObjectToScalars,
ucfirst,
UserNotificationResult,
} from "../../../utils";
import { waitForButtonConfirm } from "../../../utils/waitForInteraction";
import { CasesPlugin } from "../../Cases/CasesPlugin";
import { ModActionsPluginType, WarnOptions, WarnResult } from "../types";
import { getDefaultContactMethods } from "./getDefaultContactMethods";
export async function warnMember(
pluginData: GuildPluginData<ModActionsPluginType>,
member: GuildMember,