blob: b62d962bb9dc022bc315743926a13cae19a38359 [file] [log] [blame]
TheCodedProfafca98b2023-01-17 22:25:43 -05001import type Discord from "discord.js";
2import type { CommandInteraction } from "discord.js";
3import type { SlashCommandSubcommandBuilder } from "@discordjs/builders";
pineafanda6e5342022-07-03 10:03:16 +01004
5const command = (builder: SlashCommandSubcommandBuilder) =>
6 builder
pineafan63fc5e22022-08-04 22:04:10 +01007 .setName("rolemenu")
Skyler Grey75ea9172022-08-06 10:22:23 +01008 .setDescription("rolemenu") // TODO
Skyler Grey11236ba2022-08-08 21:13:33 +01009 .addRoleOption((option) => option.setName("role").setDescription("The role to give after verifying")); // FIXME FOR FUCK SAKE
pineafanda6e5342022-07-03 10:03:16 +010010
pineafan63fc5e22022-08-04 22:04:10 +010011const callback = async (interaction: CommandInteraction): Promise<void> => {
12 console.log("we changed the charger again because fuck you");
13 await interaction.reply("You're mum");
14};
pineafanda6e5342022-07-03 10:03:16 +010015
PineaFan64486c42022-12-28 09:21:04 +000016const check = (interaction: CommandInteraction) => {
Skyler Grey75ea9172022-08-06 10:22:23 +010017 const member = interaction.member as Discord.GuildMember;
PineaFan0d06edc2023-01-17 22:10:31 +000018 if (!member.permissions.has("ManageRoles"))
19 return "You must have the *Manage Roles* permission to use this command";
pineafanda6e5342022-07-03 10:03:16 +010020 return true;
pineafan63fc5e22022-08-04 22:04:10 +010021};
pineafanda6e5342022-07-03 10:03:16 +010022
23export { command };
24export { callback };
Skyler Grey75ea9172022-08-06 10:22:23 +010025export { check };