mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
12 lines
391 B
TypeScript
12 lines
391 B
TypeScript
import { GuildMember, Snowflake } from "discord.js";
|
|
import { GuildPluginData } from "knub";
|
|
import { UtilityPluginType } from "../types";
|
|
|
|
export async function hasPermission(
|
|
pluginData: GuildPluginData<UtilityPluginType>,
|
|
member: GuildMember,
|
|
channelId: Snowflake,
|
|
permission: string,
|
|
) {
|
|
return (await pluginData.config.getMatchingConfig({ member, channelId }))[permission];
|
|
}
|