mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Migrate ModActions to new Plugin structure !!mutes dont work!!
This commit is contained in:
parent
ebcb28261b
commit
fd56664984
29 changed files with 1213 additions and 16 deletions
|
@ -12,6 +12,9 @@ import { ClearActiveMuteOnRoleRemovalEvt } from "./events/ClearActiveMuteOnRoleR
|
|||
import { ClearMutesWithoutRoleCmd } from "./commands/ClearMutesWithoutRoleCmd";
|
||||
import { ClearMutesCmd } from "./commands/ClearMutesCmd";
|
||||
import { muteUser } from "./functions/muteUser";
|
||||
import { unmuteUser } from "./functions/unmuteUser";
|
||||
import { CaseArgs } from "../Cases/types";
|
||||
import { Member } from "eris";
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
|
@ -75,6 +78,16 @@ export const MutesPlugin = zeppelinPlugin<MutesPluginType>()("mutes", {
|
|||
return muteUser(pluginData, userId, muteTime, reason, muteOptions);
|
||||
};
|
||||
},
|
||||
unmuteUser(pluginData) {
|
||||
return (userId: string, unmuteTime: number = null, args: Partial<CaseArgs>) => {
|
||||
return unmuteUser(pluginData, userId, unmuteTime, args);
|
||||
};
|
||||
},
|
||||
hasMutedRole(pluginData) {
|
||||
return (member: Member) => {
|
||||
return member.roles.includes(pluginData.config.get().mute_role);
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
onLoad(pluginData) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue