blob: 8ae8c1a79862107f8138b063f41a658d46a7b53b [file] [log] [blame]
Skyler Grey75ea9172022-08-06 10:22:23 +01001import {
2 CommandInteraction,
3 MessageActionRow,
4 MessageButton
5} from "discord.js";
pineafanad54d752022-04-18 19:01:43 +01006import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
pineafan4edb7762022-06-26 19:21:04 +01007import EmojiEmbed from "../../utils/generateEmojiEmbed.js";
pineafan63fc5e22022-08-04 22:04:10 +01008import client from "../../utils/client.js";
pineafanad54d752022-04-18 19:01:43 +01009
10const command = (builder: SlashCommandSubcommandBuilder) =>
Skyler Grey75ea9172022-08-06 10:22:23 +010011 builder.setName("invite").setDescription("Invites Nucleus to your server");
pineafanad54d752022-04-18 19:01:43 +010012
pineafanbd02b4a2022-08-05 22:01:38 +010013const callback = async (interaction: CommandInteraction): Promise<void> => {
Skyler Grey75ea9172022-08-06 10:22:23 +010014 interaction.reply({
15 embeds: [
16 new EmojiEmbed()
17 .setTitle("Invite")
18 .setDescription(
19 "You can invite Nucleus to your server by clicking the button below"
20 )
21 .setEmoji("NUCLEUS.LOGO")
22 .setStatus("Danger")
23 ],
24 components: [
25 new MessageActionRow().addComponents([
26 new MessageButton()
27 .setLabel("Invite")
28 .setStyle("LINK")
29 .setURL(
30 `https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=295157886134&scope=bot%20applications.commands`
31 )
32 ])
33 ],
34 ephemeral: true
35 });
pineafan63fc5e22022-08-04 22:04:10 +010036};
pineafanad54d752022-04-18 19:01:43 +010037
pineafanbd02b4a2022-08-05 22:01:38 +010038const check = () => {
pineafanad54d752022-04-18 19:01:43 +010039 return true;
pineafan63fc5e22022-08-04 22:04:10 +010040};
pineafanad54d752022-04-18 19:01:43 +010041
42export { command };
43export { callback };
Skyler Grey75ea9172022-08-06 10:22:23 +010044export { check };