Implement temporary permission check public functions
This commit is contained in:
parent
7cf75f3255
commit
1c8a223264
7 changed files with 46 additions and 10 deletions
11
backend/src/plugins/ModActions/functions/hasMutePerm.ts
Normal file
11
backend/src/plugins/ModActions/functions/hasMutePerm.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { GuildMember, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { ModActionsPluginType } from "../types";
|
||||
|
||||
export async function hasMutePermission(
|
||||
pluginData: GuildPluginData<ModActionsPluginType>,
|
||||
member: GuildMember,
|
||||
channelId: Snowflake,
|
||||
) {
|
||||
return (await pluginData.config.getMatchingConfig({ member, channelId })).can_mute;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue