blob: 5a1ea5948724a3c27c9bb94d3f14eddd0dcd5c56 [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";
pineafan63fc5e22022-08-04 22:04:10 +01005import client from "../../utils/client.js";
pineafanad54d752022-04-18 19:01:43 +01006
7const command = (builder: SlashCommandSubcommandBuilder) =>
8 builder
pineafan63fc5e22022-08-04 22:04:10 +01009 .setName("invite")
10 .setDescription("Invites Nucleus to your server");
pineafanad54d752022-04-18 19:01:43 +010011
pineafan41d93562022-07-30 22:10:15 +010012const callback = async (interaction: CommandInteraction): Promise<any> => {
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});
pineafan63fc5e22022-08-04 22:04:10 +010023};
pineafanad54d752022-04-18 19:01:43 +010024
25const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
26 return true;
pineafan63fc5e22022-08-04 22:04:10 +010027};
pineafanad54d752022-04-18 19:01:43 +010028
29export { command };
30export { callback };
31export { check };