Skip to content

Commit

Permalink
Make a vote command
Browse files Browse the repository at this point in the history
  • Loading branch information
mattythedev01 committed Oct 10, 2024
1 parent d6f3bf4 commit f12b27f
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/commands/misc/vote.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const {
SlashCommandBuilder,
EmbedBuilder,
ButtonBuilder,
ActionRowBuilder,
ButtonStyle,
} = require("discord.js");

module.exports = {
data: new SlashCommandBuilder()
.setName("vote")
.setDescription("Vote for the bot and get an invite link")
.toJSON(),
userPermissions: [],
botPermissions: [],

run: async (client, interaction) => {
const voteEmbed = new EmbedBuilder()
.setColor("#FFA500")
.setTitle("🗳️ Vote for Our Bot")
.setDescription(
"Your vote helps us grow! Click the buttons below to vote for our bot or invite it to your server."
)
.setFooter({
text: "Thank you for your support!",
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp();

const buttons = new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setLabel("Top.gg")
.setStyle(ButtonStyle.Link)
.setURL("https://top.gg/bot/1292737804530356224"),
new ButtonBuilder()
.setLabel("Invite")
.setStyle(ButtonStyle.Link)
.setURL(
"https://discord.com/oauth2/authorize?client_id=1292737804530356224&scope=bot"
)
);

await interaction.reply({
embeds: [voteEmbed],
components: [buttons],
ephemeral: false,
});
},
};

0 comments on commit f12b27f

Please sign in to comment.