mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-07 19:17:19 +00:00
feat: Add user context menu commands for notes, warns, mutes and bans
This commit is contained in:
parent
24b11800f5
commit
454bec6c9f
11 changed files with 135 additions and 39 deletions
|
@ -0,0 +1,9 @@
|
|||
import { guildPluginUserContextMenuCommand } from "knub";
|
||||
import { launchBanActionModal } from "../actions/ban";
|
||||
|
||||
export const BanCmd = guildPluginUserContextMenuCommand({
|
||||
name: "Ban",
|
||||
async run({ pluginData, interaction }) {
|
||||
await launchBanActionModal(pluginData, interaction, interaction.targetId);
|
||||
},
|
||||
});
|
|
@ -9,13 +9,13 @@ import {
|
|||
} from "discord.js";
|
||||
import { GuildPluginData, guildPluginUserContextMenuCommand } from "knub";
|
||||
import { Case } from "../../../data/entities/Case";
|
||||
import { getUserInfoEmbed } from "../../../plugins/Utility/functions/getUserInfoEmbed";
|
||||
import { SECONDS, UnknownUser, emptyEmbedValue, renderUserUsername, resolveUser, trimLines } from "../../../utils";
|
||||
import { asyncMap } from "../../../utils/async";
|
||||
import { getChunkedEmbedFields } from "../../../utils/getChunkedEmbedFields";
|
||||
import { getGuildPrefix } from "../../../utils/getGuildPrefix";
|
||||
import { CasesPlugin } from "../../Cases/CasesPlugin";
|
||||
import { UtilityPlugin } from "../../Utility/UtilityPlugin";
|
||||
import { getUserInfoEmbed } from "../../Utility/functions/getUserInfoEmbed";
|
||||
import { launchBanActionModal } from "../actions/ban";
|
||||
import { launchCleanActionModal } from "../actions/clean";
|
||||
import { launchMuteActionModal } from "../actions/mute";
|
|
@ -0,0 +1,9 @@
|
|||
import { guildPluginUserContextMenuCommand } from "knub";
|
||||
import { launchMuteActionModal } from "../actions/mute";
|
||||
|
||||
export const MuteCmd = guildPluginUserContextMenuCommand({
|
||||
name: "Mute",
|
||||
async run({ pluginData, interaction }) {
|
||||
await launchMuteActionModal(pluginData, interaction, interaction.targetId);
|
||||
},
|
||||
});
|
|
@ -0,0 +1,9 @@
|
|||
import { guildPluginUserContextMenuCommand } from "knub";
|
||||
import { launchNoteActionModal } from "../actions/note";
|
||||
|
||||
export const NoteCmd = guildPluginUserContextMenuCommand({
|
||||
name: "Note",
|
||||
async run({ pluginData, interaction }) {
|
||||
await launchNoteActionModal(pluginData, interaction, interaction.targetId);
|
||||
},
|
||||
});
|
|
@ -0,0 +1,9 @@
|
|||
import { guildPluginUserContextMenuCommand } from "knub";
|
||||
import { launchWarnActionModal } from "../actions/warn";
|
||||
|
||||
export const WarnCmd = guildPluginUserContextMenuCommand({
|
||||
name: "Warn",
|
||||
async run({ pluginData, interaction }) {
|
||||
await launchWarnActionModal(pluginData, interaction, interaction.targetId);
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue