blob: 7f7d4b8d7803bc7dc4384843b774872919e2335d [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";
pineafan4edb7762022-06-26 19:21:04 +01004import EmojiEmbed 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) => {
pineafan4edb7762022-06-26 19:21:04 +010013 interaction.reply({embeds: [new EmojiEmbed()
pineafanad54d752022-04-18 19:01:43 +010014 .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 };