mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-14 13:55:03 +00:00
feat: Context menu mod menu command
This commit is contained in:
parent
5a4e50b19d
commit
771ed76f64
17 changed files with 818 additions and 204 deletions
|
@ -41,7 +41,12 @@ import { CreateUnbanCaseOnManualUnbanEvt } from "./events/CreateUnbanCaseOnManua
|
|||
import { PostAlertOnMemberJoinEvt } from "./events/PostAlertOnMemberJoinEvt";
|
||||
import { banUserId } from "./functions/banUserId";
|
||||
import { clearTempban } from "./functions/clearTempban";
|
||||
import { hasMutePermission } from "./functions/hasMutePerm";
|
||||
import {
|
||||
hasBanPermission,
|
||||
hasMutePermission,
|
||||
hasNotePermission,
|
||||
hasWarnPermission,
|
||||
} from "./functions/hasModActionPerm";
|
||||
import { kickMember } from "./functions/kickMember";
|
||||
import { offModActionsEvent } from "./functions/offModActionsEvent";
|
||||
import { onModActionsEvent } from "./functions/onModActionsEvent";
|
||||
|
@ -158,7 +163,7 @@ export const ModActionsPlugin = zeppelinGuildPlugin<ModActionsPluginType>()({
|
|||
public: {
|
||||
warnMember(pluginData) {
|
||||
return (member: GuildMember, reason: string, warnOptions?: WarnOptions) => {
|
||||
warnMember(pluginData, member, reason, warnOptions);
|
||||
return warnMember(pluginData, member, reason, warnOptions);
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -170,7 +175,7 @@ export const ModActionsPlugin = zeppelinGuildPlugin<ModActionsPluginType>()({
|
|||
|
||||
banUserId(pluginData) {
|
||||
return (userId: string, reason?: string, banOptions?: BanOptions, banTime?: number) => {
|
||||
banUserId(pluginData, userId, reason, banOptions, banTime);
|
||||
return banUserId(pluginData, userId, reason, banOptions, banTime);
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -180,12 +185,30 @@ export const ModActionsPlugin = zeppelinGuildPlugin<ModActionsPluginType>()({
|
|||
};
|
||||
},
|
||||
|
||||
hasNotePermission(pluginData) {
|
||||
return (member: GuildMember, channelId: Snowflake) => {
|
||||
return hasNotePermission(pluginData, member, channelId);
|
||||
};
|
||||
},
|
||||
|
||||
hasWarnPermission(pluginData) {
|
||||
return (member: GuildMember, channelId: Snowflake) => {
|
||||
return hasWarnPermission(pluginData, member, channelId);
|
||||
};
|
||||
},
|
||||
|
||||
hasMutePermission(pluginData) {
|
||||
return (member: GuildMember, channelId: Snowflake) => {
|
||||
return hasMutePermission(pluginData, member, channelId);
|
||||
};
|
||||
},
|
||||
|
||||
hasBanPermission(pluginData) {
|
||||
return (member: GuildMember, channelId: Snowflake) => {
|
||||
return hasBanPermission(pluginData, member, channelId);
|
||||
};
|
||||
},
|
||||
|
||||
on: mapToPublicFn(onModActionsEvent),
|
||||
off: mapToPublicFn(offModActionsEvent),
|
||||
getEventEmitter(pluginData) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue