blob: 44934e143156cbaac8cb589a4958caa0c9213886 [file] [log] [blame]
pineafanad54d752022-04-18 19:01:43 +01001import { CommandInteraction, MessageActionRow, MessageButton } from "discord.js";
2import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
3import { WrappedCheck } from "jshaiku";
4import generateEmojiEmbed from "../../utils/generateEmojiEmbed.js";
5
6const command = (builder: SlashCommandSubcommandBuilder) =>
7 builder
8 .setName("invite")
9 .setDescription("Invites Nucleus to your server")
10
11const callback = (interaction: CommandInteraction) => {
12 interaction.reply({embeds: [new generateEmojiEmbed()
13 .setTitle("Invite")
14 .setDescription("You can invite Nucleus to your server by clicking the button below")
15 .setEmoji("NUCLEUS.LOGO")
16 .setStatus("Danger")
17 ], components: [new MessageActionRow().addComponents([new MessageButton()
18 .setLabel("Invite")
19 .setStyle("LINK")
20 .setURL(`https://discord.com/api/oauth2/authorize?client_id=${interaction.client.user.id}&permissions=295157886134&scope=bot%20applications.commands`)
21 ])], ephemeral: true});
22}
23
24const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
25 return true;
26}
27
28export { command };
29export { callback };
30export { check };