pineafan | da6e534 | 2022-07-03 10:03:16 +0100 | [diff] [blame] | 1 | import Discord, { CommandInteraction, MessageActionRow, MessageButton } from "discord.js"; |
| 2 | import EmojiEmbed from "../../utils/generateEmojiEmbed.js"; |
| 3 | import confirmationMessage from "../../utils/confirmationMessage.js"; |
| 4 | import getEmojiByName from "../../utils/getEmojiByName.js"; |
| 5 | import { SlashCommandSubcommandBuilder } from "@discordjs/builders"; |
| 6 | import { WrappedCheck } from "jshaiku"; |
| 7 | import client from "../../utils/client.js"; |
| 8 | |
| 9 | const command = (builder: SlashCommandSubcommandBuilder) => |
| 10 | builder |
pineafan | c1c1879 | 2022-08-03 21:41:36 +0100 | [diff] [blame^] | 11 | .setName("rolemenu") |
| 12 | .setDescription("rolemenu")// TODO |
| 13 | .addRoleOption(option => option.setName("role").setDescription("The role to give after verifying")) // TODO |
pineafan | da6e534 | 2022-07-03 10:03:16 +0100 | [diff] [blame] | 14 | |
| 15 | const callback = async (interaction: CommandInteraction): Promise<any> => { |
| 16 | } |
| 17 | |
| 18 | const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => { |
| 19 | let member = (interaction.member as Discord.GuildMember) |
pineafan | e23c4ec | 2022-07-27 21:56:27 +0100 | [diff] [blame] | 20 | if (!member.permissions.has("MANAGE_ROLES")) throw "You must have the *Manage Roles* permission to use this command" |
pineafan | da6e534 | 2022-07-03 10:03:16 +0100 | [diff] [blame] | 21 | return true; |
| 22 | } |
| 23 | |
| 24 | export { command }; |
| 25 | export { callback }; |
| 26 | export { check }; |