2024-02-11 01:04:12 +00:00
|
|
|
import {
|
|
|
|
ApplicationCommandType,
|
|
|
|
ContextMenuCommandBuilder,
|
|
|
|
PermissionFlagsBits,
|
|
|
|
ContextMenuCommandInteraction
|
|
|
|
} from 'discord.js';
|
2024-04-05 08:30:41 +00:00
|
|
|
import { removeSelfRoles } from '../../../shared.js';
|
2024-02-08 20:11:56 +00:00
|
|
|
|
|
|
|
export const data = new ContextMenuCommandBuilder()
|
|
|
|
.setDMPermission(false)
|
|
|
|
.setName('Remove self roles')
|
2024-02-09 21:41:58 +00:00
|
|
|
.setType(ApplicationCommandType.Message)
|
|
|
|
.setDefaultMemberPermissions(PermissionFlagsBits.ManageRoles);
|
2024-02-11 01:04:12 +00:00
|
|
|
/** @param {ContextMenuCommandInteraction} interaction */
|
2024-02-08 20:11:56 +00:00
|
|
|
export async function execute(interaction) {
|
|
|
|
const id = interaction.targetMessage.id;
|
|
|
|
await removeSelfRoles(interaction, id);
|
|
|
|
}
|