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

Implement temporary permission check public functions

This commit is contained in:
Dark 2021-08-15 01:44:25 +02:00
parent 7cf75f3255
commit 1c8a223264
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8
7 changed files with 46 additions and 10 deletions

View file

@ -38,6 +38,7 @@ import { CreateKickCaseOnManualKickEvt } from "./events/CreateKickCaseOnManualKi
import { CreateUnbanCaseOnManualUnbanEvt } from "./events/CreateUnbanCaseOnManualUnbanEvt";
import { PostAlertOnMemberJoinEvt } from "./events/PostAlertOnMemberJoinEvt";
import { banUserId } from "./functions/banUserId";
import { hasMutePermission } from "./functions/hasMutePerm";
import { kickMember } from "./functions/kickMember";
import { offModActionsEvent } from "./functions/offModActionsEvent";
import { onModActionsEvent } from "./functions/onModActionsEvent";
@ -181,6 +182,12 @@ export const ModActionsPlugin = zeppelinGuildPlugin<ModActionsPluginType>()({
};
},
hasMutePermission(pluginData) {
return (member: GuildMember, channelId: string) => {
return hasMutePermission(pluginData, member, channelId);
};
},
on: mapToPublicFn(onModActionsEvent),
off: mapToPublicFn(offModActionsEvent),
getEventEmitter(pluginData) {