blob: 6f95b4616b2f17a35809df3839109a5d55b913a0 [file] [log] [blame]
pineafanda6e5342022-07-03 10:03:16 +01001import Discord, { CommandInteraction, MessageActionRow, MessageButton } from "discord.js";
2import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
3import confirmationMessage from "../../utils/confirmationMessage.js";
4import getEmojiByName from "../../utils/getEmojiByName.js";
5import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
6import { WrappedCheck } from "jshaiku";
7import client from "../../utils/client.js";
8
9const 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
15const callback = async (interaction: CommandInteraction): Promise<any> => {
16}
17
18const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
19 let member = (interaction.member as Discord.GuildMember)
pineafane23c4ec2022-07-27 21:56:27 +010020 if (!member.permissions.has("MANAGE_ROLES")) throw "You must have the *Manage Roles* permission to use this command"
pineafanda6e5342022-07-03 10:03:16 +010021 return true;
22}
23
24export { command };
25export { callback };
26export { check };