blob: e05485b8b1d045183790611612a2e05fd9f87c97 [file] [log] [blame]
pineafan63fc5e22022-08-04 22:04:10 +01001import Discord, { CommandInteraction } from "discord.js";
pineafanda6e5342022-07-03 10:03:16 +01002import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
pineafanda6e5342022-07-03 10:03:16 +01003
4const command = (builder: SlashCommandSubcommandBuilder) =>
5 builder
pineafan63fc5e22022-08-04 22:04:10 +01006 .setName("rolemenu")
Skyler Grey75ea9172022-08-06 10:22:23 +01007 .setDescription("rolemenu") // TODO
Skyler Grey11236ba2022-08-08 21:13:33 +01008 .addRoleOption((option) => option.setName("role").setDescription("The role to give after verifying")); // FIXME FOR FUCK SAKE
pineafanda6e5342022-07-03 10:03:16 +01009
pineafan63fc5e22022-08-04 22:04:10 +010010const callback = async (interaction: CommandInteraction): Promise<void> => {
11 console.log("we changed the charger again because fuck you");
12 await interaction.reply("You're mum");
13};
pineafanda6e5342022-07-03 10:03:16 +010014
PineaFan64486c42022-12-28 09:21:04 +000015const check = (interaction: CommandInteraction) => {
Skyler Grey75ea9172022-08-06 10:22:23 +010016 const member = interaction.member as Discord.GuildMember;
PineaFan0d06edc2023-01-17 22:10:31 +000017 if (!member.permissions.has("ManageRoles"))
18 return "You must have the *Manage Roles* permission to use this command";
pineafanda6e5342022-07-03 10:03:16 +010019 return true;
pineafan63fc5e22022-08-04 22:04:10 +010020};
pineafanda6e5342022-07-03 10:03:16 +010021
22export { command };
23export { callback };
Skyler Grey75ea9172022-08-06 10:22:23 +010024export { check };