discord-multipurpose-bot/commands/core/invite.js
Ayden cb5a906850
Some checks are pending
Docker / build (push) Waiting to run
Feat/Add Music Commands (#1)
* add simple music functionality

* update workflow

* update Dockerfile

* update Dockerfile

* update Dockerfile

* update Dockerfile

* add few more music commands

* add lyrics command

* update lyrics command

* add loop, and add categories to all commands

* change discord status

* seperate distube and change startup console theme

* Update README

* UPDATE LICENSE file

* fix docker compose image, add better error handling for distube and update tagging workflow

* switch to node-alpine image for docker

* switch to node-alpine image for docker

* update ascii

* music commands imporvements, implement live lyrics, some guards and bot leaving on empty

* use ffmpeg package rather than ffmpeg-static
2025-09-21 01:26:18 +01:00

35 lines
1.2 KiB
JavaScript

const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
module.exports = {
data: new SlashCommandBuilder()
.setName("invite")
.setDescription("Provides an invite link to add the bot to your server."),
category: "Core",
async execute(interaction, client) {
try {
const botInviteLink = `https://discord.com/oauth2/authorize?client_id=${client.user.id}&permissions=8&scope=bot%20applications.commands`;
const inviteEmbed = new EmbedBuilder()
.setColor("#0099ff")
.setTitle("Invite the Bot to Your Server!")
.setDescription(`**[Click here to invite the bot!](${botInviteLink})**`)
.setTimestamp()
.setFooter({
text: `Requested by ${interaction.user.tag}`,
iconURL: interaction.user.displayAvatarURL(),
});
await interaction.reply({
embeds: [inviteEmbed],
ephemeral: true,
});
} catch (error) {
console.error("Error executing the invite command:", error);
await interaction.reply({
content: "There was an error while executing this command!",
ephemeral: true,
});
}
},
};