blob: ebc3c34e36e07093e8c7cd6c371d1e79edd2dc95 [file] [log] [blame]
pineafanad54d752022-04-18 19:01:43 +01001import { CommandInteraction, MessageActionRow, MessageButton } from "discord.js";
2import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
pineafan4edb7762022-06-26 19:21:04 +01003import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
pineafan63fc5e22022-08-04 22:04:10 +01004import client from "../../utils/client.js";
pineafanad54d752022-04-18 19:01:43 +01005
6const command = (builder: SlashCommandSubcommandBuilder) =>
7 builder
pineafan63fc5e22022-08-04 22:04:10 +01008 .setName("invite")
9 .setDescription("Invites Nucleus to your server");
pineafanad54d752022-04-18 19:01:43 +010010
pineafanbd02b4a2022-08-05 22:01:38 +010011const callback = async (interaction: CommandInteraction): Promise<void> => {
pineafan4edb7762022-06-26 19:21:04 +010012 interaction.reply({embeds: [new EmojiEmbed()
pineafanad54d752022-04-18 19:01:43 +010013 .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")
PineappleFanb3dd83c2022-06-17 10:53:48 +010020 .setURL(`https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=295157886134&scope=bot%20applications.commands`)
pineafanad54d752022-04-18 19:01:43 +010021 ])], ephemeral: true});
pineafan63fc5e22022-08-04 22:04:10 +010022};
pineafanad54d752022-04-18 19:01:43 +010023
pineafanbd02b4a2022-08-05 22:01:38 +010024const check = () => {
pineafanad54d752022-04-18 19:01:43 +010025 return true;
pineafan63fc5e22022-08-04 22:04:10 +010026};
pineafanad54d752022-04-18 19:01:43 +010027
28export { command };
29export { callback };
30export { check };