DiscordJS-Template/commands/admin/self_roles/context/remove.js

13 lines
503 B
JavaScript
Raw Normal View History

2024-02-08 20:11:56 +00:00
import { removeSelfRoles } from '../../../../shared.js';
import { ApplicationCommandType, ContextMenuCommandBuilder, PermissionFlagsBits } from 'discord.js';
2024-02-08 20:11:56 +00:00
export const data = new ContextMenuCommandBuilder()
.setDMPermission(false)
.setName('Remove self roles')
.setType(ApplicationCommandType.Message)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageRoles);
2024-02-08 20:11:56 +00:00
export async function execute(interaction) {
const id = interaction.targetMessage.id;
await removeSelfRoles(interaction, id);
}