mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-17 15:15:02 +00:00
resolve member?
This commit is contained in:
parent
2fc42c217a
commit
4094cce931
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ import { GuildPluginData } from "knub";
|
||||||
import { canActOn } from "src/pluginUtils";
|
import { canActOn } from "src/pluginUtils";
|
||||||
import { ModActionsPlugin } from "src/plugins/ModActions/ModActionsPlugin";
|
import { ModActionsPlugin } from "src/plugins/ModActions/ModActionsPlugin";
|
||||||
import { logger } from "../../../logger";
|
import { logger } from "../../../logger";
|
||||||
import { convertDelayStringToMS, renderUserUsername } from "../../../utils";
|
import { convertDelayStringToMS, renderUserUsername, resolveMember } from "../../../utils";
|
||||||
import { CaseArgs } from "../../Cases/types";
|
import { CaseArgs } from "../../Cases/types";
|
||||||
import { MODAL_TIMEOUT } from "../commands/ModMenuUserCtxCmd";
|
import { MODAL_TIMEOUT } from "../commands/ModMenuUserCtxCmd";
|
||||||
import { ContextMenuPluginType, ModMenuActionType } from "../types";
|
import { ContextMenuPluginType, ModMenuActionType } from "../types";
|
||||||
|
@ -40,7 +40,7 @@ async function banAction(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const targetMember = await pluginData.guild.members.fetch(target);
|
const targetMember = await resolveMember(pluginData.client, pluginData.guild, target);
|
||||||
if (!canActOn(pluginData, executingMember, targetMember)) {
|
if (!canActOn(pluginData, executingMember, targetMember)) {
|
||||||
await interactionToReply
|
await interactionToReply
|
||||||
.editReply({ content: "Cannot ban: insufficient permissions", embeds: [], components: [] })
|
.editReply({ content: "Cannot ban: insufficient permissions", embeds: [], components: [] })
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue