mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
Add -update/-up argument to automatically update latest/chosen case with !clean (#173)
This commit is contained in:
parent
dfc1bf2ba0
commit
20b1c869cd
5 changed files with 93 additions and 52 deletions
|
@ -30,7 +30,7 @@ import { GuildCases } from "../../data/GuildCases";
|
|||
import { GuildLogs } from "../../data/GuildLogs";
|
||||
import { ForceUnmuteCmd } from "./commands/ForceunmuteCmd";
|
||||
import { warnMember } from "./functions/warnMember";
|
||||
import { Member } from "eris";
|
||||
import { Member, Message } from "eris";
|
||||
import { kickMember } from "./functions/kickMember";
|
||||
import { banUserId } from "./functions/banUserId";
|
||||
import { MassmuteCmd } from "./commands/MassmuteCmd";
|
||||
|
@ -43,6 +43,7 @@ import { EventEmitter } from "events";
|
|||
import { mapToPublicFn } from "../../pluginUtils";
|
||||
import { onModActionsEvent } from "./functions/onModActionsEvent";
|
||||
import { offModActionsEvent } from "./functions/offModActionsEvent";
|
||||
import { updateCase } from "./functions/updateCase";
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
|
@ -170,6 +171,12 @@ export const ModActionsPlugin = zeppelinGuildPlugin<ModActionsPluginType>()("mod
|
|||
};
|
||||
},
|
||||
|
||||
updateCase(pluginData) {
|
||||
return (msg: Message, caseNumber: number | null, note: string) => {
|
||||
updateCase(pluginData, msg, { caseNumber, note });
|
||||
};
|
||||
},
|
||||
|
||||
on: mapToPublicFn(onModActionsEvent),
|
||||
off: mapToPublicFn(offModActionsEvent),
|
||||
getEventEmitter(pluginData) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue