mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-11 04:45:02 +00:00
Implement temporary permission check public functions
This commit is contained in:
parent
7cf75f3255
commit
1c8a223264
7 changed files with 46 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
import { MessageEmbedOptions } from "discord.js";
|
||||
import { GuildMember, MessageEmbedOptions } from "discord.js";
|
||||
import { PluginOptions } from "knub";
|
||||
import { GuildArchives } from "../../data/GuildArchives";
|
||||
import { GuildCases } from "../../data/GuildCases";
|
||||
|
@ -38,6 +38,7 @@ import { VcdisconnectCmd } from "./commands/VcdisconnectCmd";
|
|||
import { VcmoveAllCmd, VcmoveCmd } from "./commands/VcmoveCmd";
|
||||
import { AutoJoinThreadEvt, AutoJoinThreadSyncEvt } from "./events/AutoJoinThreadEvt";
|
||||
import { getUserInfoEmbed } from "./functions/getUserInfoEmbed";
|
||||
import { hasPermission } from "./functions/hasPermission";
|
||||
import { activeReloads } from "./guildReloads";
|
||||
import { refreshMembersIfNeeded } from "./refreshMembers";
|
||||
import { ConfigSchema, UtilityPluginType } from "./types";
|
||||
|
@ -170,6 +171,12 @@ export const UtilityPlugin = zeppelinGuildPlugin<UtilityPluginType>()({
|
|||
return getUserInfoEmbed(pluginData, userId, false, requestMemberId);
|
||||
};
|
||||
},
|
||||
|
||||
hasPermission(pluginData) {
|
||||
return (member: GuildMember, channelId: string, permission: string) => {
|
||||
return hasPermission(pluginData, member, channelId, permission);
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
beforeLoad(pluginData) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue