blob: 8b25820d9fe80414f6e96fe3784ad03b4e1aa96e [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";
PineappleFanb3dd83c2022-06-17 10:53:48 +01005import client from "../../utils/client.js"
pineafanad54d752022-04-18 19:01:43 +01006
7const command = (builder: SlashCommandSubcommandBuilder) =>
8 builder
9 .setName("invite")
10 .setDescription("Invites Nucleus to your server")
11
12const callback = (interaction: CommandInteraction) => {
13 interaction.reply({embeds: [new generateEmojiEmbed()
14 .setTitle("Invite")
15 .setDescription("You can invite Nucleus to your server by clicking the button below")
16 .setEmoji("NUCLEUS.LOGO")
17 .setStatus("Danger")
18 ], components: [new MessageActionRow().addComponents([new MessageButton()
19 .setLabel("Invite")
20 .setStyle("LINK")
PineappleFanb3dd83c2022-06-17 10:53:48 +010021 .setURL(`https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=295157886134&scope=bot%20applications.commands`)
pineafanad54d752022-04-18 19:01:43 +010022 ])], ephemeral: true});
23}
24
25const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
26 return true;
27}
28
29export { command };
30export { callback };
31export { check };