mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-14 05:57:18 +00:00
Rename filter args to work like pm2 args
This commit is contained in:
parent
ff26ad2c41
commit
be3fa7e57e
1 changed files with 12 additions and 12 deletions
|
@ -21,12 +21,12 @@ const opts = {
|
||||||
expand: ct.bool({ option: true, isSwitch: true, shortcut: "e" }),
|
expand: ct.bool({ option: true, isSwitch: true, shortcut: "e" }),
|
||||||
hidden: ct.bool({ option: true, isSwitch: true, shortcut: "h" }),
|
hidden: ct.bool({ option: true, isSwitch: true, shortcut: "h" }),
|
||||||
reverseFilters: ct.switchOption({ shortcut: "r" }),
|
reverseFilters: ct.switchOption({ shortcut: "r" }),
|
||||||
onlyNotes: ct.switchOption({ shortcut: "n" }),
|
notes: ct.switchOption({ shortcut: "n" }),
|
||||||
onlyWarns: ct.switchOption({ shortcut: "w" }),
|
warns: ct.switchOption({ shortcut: "w" }),
|
||||||
onlyMutes: ct.switchOption({ shortcut: "m" }),
|
mutes: ct.switchOption({ shortcut: "m" }),
|
||||||
onyUnmutes: ct.switchOption({ shortcut: "um" }),
|
unmutes: ct.switchOption({ shortcut: "um" }),
|
||||||
onlyBans: ct.switchOption({ shortcut: "b" }),
|
bans: ct.switchOption({ shortcut: "b" }),
|
||||||
onyUnbans: ct.switchOption({ shortcut: "ub" }),
|
unbans: ct.switchOption({ shortcut: "ub" }),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CasesUserCmd = modActionsCmd({
|
export const CasesUserCmd = modActionsCmd({
|
||||||
|
@ -52,12 +52,12 @@ export const CasesUserCmd = modActionsCmd({
|
||||||
let cases = await pluginData.state.cases.with("notes").getByUserId(user.id);
|
let cases = await pluginData.state.cases.with("notes").getByUserId(user.id);
|
||||||
|
|
||||||
const typesToShow: CaseTypes[] = [];
|
const typesToShow: CaseTypes[] = [];
|
||||||
if (args.onlyNotes) typesToShow.push(CaseTypes.Note);
|
if (args.notes) typesToShow.push(CaseTypes.Note);
|
||||||
if (args.onlyWarns) typesToShow.push(CaseTypes.Warn);
|
if (args.warns) typesToShow.push(CaseTypes.Warn);
|
||||||
if (args.onlyMutes) typesToShow.push(CaseTypes.Mute);
|
if (args.mutes) typesToShow.push(CaseTypes.Mute);
|
||||||
if (args.onyUnmutes) typesToShow.push(CaseTypes.Unmute);
|
if (args.unmutes) typesToShow.push(CaseTypes.Unmute);
|
||||||
if (args.onlyBans) typesToShow.push(CaseTypes.Ban);
|
if (args.bans) typesToShow.push(CaseTypes.Ban);
|
||||||
if (args.onyUnbans) typesToShow.push(CaseTypes.Unban);
|
if (args.unbans) typesToShow.push(CaseTypes.Unban);
|
||||||
|
|
||||||
if (typesToShow.length > 0) {
|
if (typesToShow.length > 0) {
|
||||||
// Reversed: Hide specified types
|
// Reversed: Hide specified types
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue