Skip to content

Commit

Permalink
[New] Added invite to be able to invite the bot to other servers
Browse files Browse the repository at this point in the history
  • Loading branch information
naseif committed Sep 30, 2021
1 parent 2f0ae34 commit 3fee9c4
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions commands/misc/invite.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
const { SlashCommandBuilder } = require("@discordjs/builders");
const { MessageEmbed, MessageButton, MessageActionRow } = require("discord.js");

module.exports = {
data: new SlashCommandBuilder()
.setName("invite")
.setDescription("Get my link to invite me to other servers!"),
async execute(interaction, client) {
await interaction.deferReply();

const row = new MessageActionRow().addComponents(
new MessageButton()
.setLabel("Invite")
.setStyle("LINK")
.setURL(
`https://discord.com/oauth2/authorize?client_id=${client.user.id}&scope=applications.commands%20bot&permissions=536079414`
),
new MessageButton()
.setLabel("GitHub")
.setStyle("LINK")
.setURL("https://github.com/naseif/Eyesense-Music-Bot"),
new MessageButton()
.setLabel("Support")
.setStyle("LINK")
.setURL("https://discord.gg/JCdpeeNP9N")
);

const embed = new MessageEmbed()
.setAuthor(
"Eyesense",
"https://cdn.discordapp.com/attachments/547844388492148737/893093188926079036/c8e3bbbc07dc4680bea5b355f2c708c7.png"
)
.setThumbnail(
"https://cdn.discordapp.com/attachments/547844388492148737/893093188926079036/c8e3bbbc07dc4680bea5b355f2c708c7.png"
)
.setColor("#9dcc37")
.addField(
"Eyesense",
`Eyesense is a feature-rich discord bot that provides over 100 commands!`,
true
);
await interaction.followUp({ embeds: [embed], components: [row] });
},
};

0 comments on commit 3fee9c4

Please sign in to comment.