3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-15 14:15:03 +00:00

feat: first batch of emojis 🎉

This commit is contained in:
Lily Bergonzat 2024-02-14 09:17:11 +01:00
parent dfb0e2c19d
commit a4c4b17a14
91 changed files with 3659 additions and 2032 deletions

View file

@ -0,0 +1,47 @@
import { commandTypeHelpers as ct } from "../../../../commandTypes";
import { actualCasesCmd } from "../../functions/actualCommands/actualCasesCmd";
import { modActionsMsgCmd } from "../../types";
const opts = {
mod: ct.userId({ option: true }),
expand: ct.bool({ option: true, isSwitch: true, shortcut: "e" }),
hidden: ct.bool({ option: true, isSwitch: true, shortcut: "h" }),
reverseFilters: ct.switchOption({ def: false, shortcut: "r" }),
notes: ct.switchOption({ def: false, shortcut: "n" }),
warns: ct.switchOption({ def: false, shortcut: "w" }),
mutes: ct.switchOption({ def: false, shortcut: "m" }),
unmutes: ct.switchOption({ def: false, shortcut: "um" }),
bans: ct.switchOption({ def: false, shortcut: "b" }),
unbans: ct.switchOption({ def: false, shortcut: "ub" }),
};
export const CasesModMsgCmd = modActionsMsgCmd({
trigger: ["cases", "modlogs", "infractions"],
permission: "can_view",
description: "Show the most recent 5 cases by the specified -mod",
signature: [
{
...opts,
},
],
async run({ pluginData, message: msg, args }) {
return actualCasesCmd(
pluginData,
msg.channel,
args.mod,
null,
msg.author,
args.notes,
args.warns,
args.mutes,
args.unmutes,
args.bans,
args.unbans,
args.reverseFilters,
args.hidden,
args.expand,
);
},
});

View file

@ -0,0 +1,48 @@
import { slashOptions } from "knub";
import { actualCasesCmd } from "../../functions/actualCommands/actualCasesCmd";
const opts = [
slashOptions.user({ name: "user", description: "The user to show cases for", required: false }),
slashOptions.user({ name: "mod", description: "The mod to filter cases by", required: false }),
slashOptions.boolean({ name: "expand", description: "Show each case individually", required: false }),
slashOptions.boolean({ name: "hidden", description: "Whether or not to show hidden cases", required: false }),
slashOptions.boolean({
name: "reverse-filters",
description: "To treat case type filters as exclusive instead of inclusive",
required: false,
}),
slashOptions.boolean({ name: "notes", description: "To filter notes", required: false }),
slashOptions.boolean({ name: "warns", description: "To filter warns", required: false }),
slashOptions.boolean({ name: "mutes", description: "To filter mutes", required: false }),
slashOptions.boolean({ name: "unmutes", description: "To filter unmutes", required: false }),
slashOptions.boolean({ name: "bans", description: "To filter bans", required: false }),
slashOptions.boolean({ name: "unbans", description: "To filter unbans", required: false }),
];
export const CasesSlashCmd = {
name: "cases",
configPermission: "can_view",
description: "Show a list of cases the specified user has or the specified mod made",
allowDms: false,
signature: [...opts],
async run({ interaction, options, pluginData }) {
return actualCasesCmd(
pluginData,
interaction,
options.mod,
options.user,
interaction.user,
options.notes,
options.warns,
options.mutes,
options.unmutes,
options.bans,
options.unbans,
options["reverse-filters"],
options.hidden,
options.expand,
);
},
};

View file

@ -0,0 +1,57 @@
import { commandTypeHelpers as ct } from "../../../../commandTypes";
import { sendErrorMessage } from "../../../../pluginUtils";
import { resolveUser } from "../../../../utils";
import { actualCasesCmd } from "../../functions/actualCommands/actualCasesCmd";
import { modActionsMsgCmd } from "../../types";
const opts = {
mod: ct.userId({ option: true }),
expand: ct.bool({ option: true, isSwitch: true, shortcut: "e" }),
hidden: ct.bool({ option: true, isSwitch: true, shortcut: "h" }),
reverseFilters: ct.switchOption({ def: false, shortcut: "r" }),
notes: ct.switchOption({ def: false, shortcut: "n" }),
warns: ct.switchOption({ def: false, shortcut: "w" }),
mutes: ct.switchOption({ def: false, shortcut: "m" }),
unmutes: ct.switchOption({ def: false, shortcut: "um" }),
bans: ct.switchOption({ def: false, shortcut: "b" }),
unbans: ct.switchOption({ def: false, shortcut: "ub" }),
};
export const CasesUserMsgCmd = modActionsMsgCmd({
trigger: ["cases", "modlogs", "infractions"],
permission: "can_view",
description: "Show a list of cases the specified user has",
signature: [
{
user: ct.string(),
...opts,
},
],
async run({ pluginData, message: msg, args }) {
const user = await resolveUser(pluginData.client, args.user);
if (!user.id) {
sendErrorMessage(pluginData, msg.channel, `User not found`);
return;
}
return actualCasesCmd(
pluginData,
msg.channel,
args.mod,
user,
msg.author,
args.notes,
args.warns,
args.mutes,
args.unmutes,
args.bans,
args.unbans,
args.reverseFilters,
args.hidden,
args.expand,
);
},
});