blob: 341f7d22733e0dddf471be76c2f2ef6b031494c8 [file] [log] [blame]
Skyler Grey11236ba2022-08-08 21:13:33 +01001import { CommandInteraction, MessageActionRow, MessageButton } from "discord.js";
pineafanad54d752022-04-18 19:01:43 +01002import { 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) =>
Skyler Grey75ea9172022-08-06 10:22:23 +01007 builder.setName("invite").setDescription("Invites Nucleus to your server");
pineafanad54d752022-04-18 19:01:43 +01008
pineafanbd02b4a2022-08-05 22:01:38 +01009const callback = async (interaction: CommandInteraction): Promise<void> => {
Skyler Grey75ea9172022-08-06 10:22:23 +010010 interaction.reply({
11 embeds: [
12 new EmojiEmbed()
13 .setTitle("Invite")
Skyler Grey11236ba2022-08-08 21:13:33 +010014 .setDescription("You can invite Nucleus to your server by clicking the button below")
Skyler Grey75ea9172022-08-06 10:22:23 +010015 .setEmoji("NUCLEUS.LOGO")
16 .setStatus("Danger")
17 ],
18 components: [
19 new MessageActionRow().addComponents([
20 new MessageButton()
21 .setLabel("Invite")
22 .setStyle("LINK")
23 .setURL(
24 `https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=295157886134&scope=bot%20applications.commands`
25 )
26 ])
27 ],
28 ephemeral: true
29 });
pineafan63fc5e22022-08-04 22:04:10 +010030};
pineafanad54d752022-04-18 19:01:43 +010031
pineafanbd02b4a2022-08-05 22:01:38 +010032const check = () => {
pineafanad54d752022-04-18 19:01:43 +010033 return true;
pineafan63fc5e22022-08-04 22:04:10 +010034};
pineafanad54d752022-04-18 19:01:43 +010035
36export { command };
37export { callback };
Skyler Grey75ea9172022-08-06 10:22:23 +010038export { check };