Discord_API_Bot/slash-commands/link.js

31 lines
No EOL
974 B
JavaScript

const { auth_url } = require("../config");
const { SlashCommandBuilder, EmbedBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName("link")
.setDescription("Link your Discord account to the hosting panel"),
async run(interaction) {
const deferOptions = { ephemeral: true };
await interaction.deferReply(deferOptions);
const authorText = { name: "Link Your Account" };
const footerText = { text: "Coded by @onurcansevinc" };
const thumbnailOptions = { dynamic: true };
let linkEmbed = new EmbedBuilder()
.setColor('Random')
.setAuthor(authorText)
.setFooter(footerText)
.setThumbnail(interaction.guild.iconURL(thumbnailOptions))
.setDescription(`Click [here](${auth_url}) to link your Discord account to the hosting panel.`);
const replyOptions = {
embeds: [linkEmbed],
ephemeral: true
};
return interaction.editReply(replyOptions);
}
};