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 |
| 11 | .setName("role") |
| 12 | .setDescription("Sets or shows the role given to users after using /verify") |
| 13 | .addRoleOption(option => option.setName("role").setDescription("The role to give after verifying")) |
| 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) |
| 20 | if (!member.permissions.has("MANAGE_ROLES")) throw "You must have the Manage roles permission to use this command" |
| 21 | return true; |
| 22 | } |
| 23 | |
| 24 | export { command }; |
| 25 | export { callback }; |
| 26 | export { check }; |