From 3ec6a40bbda27ac382ac7645073910d22f78063a Mon Sep 17 00:00:00 2001 From: Sandaru Tharuneth Date: Fri, 6 Jan 2023 18:40:20 +0530 Subject: [PATCH] Update giveawayRerolled.js --- events/giveaways/giveawayRerolled.js | 34 ++++++++++++++++------------ 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/events/giveaways/giveawayRerolled.js b/events/giveaways/giveawayRerolled.js index 466cda4..98bcc7b 100644 --- a/events/giveaways/giveawayRerolled.js +++ b/events/giveaways/giveawayRerolled.js @@ -1,34 +1,38 @@ -const { MessageEmbed, MessageButton, MessageActionRow } = require("discord.js") +const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js'); + module.exports = { async execute(giveaway, winners) { winners.forEach((member) => { member.send({ - components: [new MessageActionRow() + + components: [new ActionRowBuilder() .addComponents( - new MessageButton() + new ButtonBuilder() .setLabel("Jump to the Giveaway") - .setStyle("LINK") + .setStyle(ButtonStyle.Link) .setURL(`https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId}`) .setEmoji('973495590921043968'), - new MessageButton() + new ButtonBuilder() .setLabel("Vote Me") - .setStyle("LINK") - .setURL("https://discordbotlist.com/bots/ivon/upvote") - .setEmoji('974160940197113916'), - new MessageButton() + .setStyle(ButtonStyle.Link) + .setURL("https://top.gg/bot/973436715819745290/vote") + .setEmoji('960895425567666246'), + new ButtonBuilder() .setLabel("Invite Me") - .setStyle("LINK") + .setStyle(ButtonStyle.Link) .setURL("https://discord.com/api/oauth2/authorize?client_id=973436715819745290&permissions=406881561681&scope=bot%20applications.commands") .setEmoji('984296691794583582'))], - embeds: [new MessageEmbed() - .setAuthor({name: "Congratulations!", iconURL: (process.env.THUMBNAIL)}) - .setThumbnail(process.env.THUMBNAIL) + + embeds: [new Discord.EmbedBuilder() + .setAuthor({name: "Congratulations!", iconURL: ('https://i.imgur.com/sB02Hbz.png')}) + .setThumbnail('https://i.imgur.com/sB02Hbz.png') .setColor("#2F3136") - .setDescription(`Hello there ${member.user}\n Host of the giveaway rerolled and you have won the Giveaway on **[This Server](https://discord.com/channels/${giveaway.guildId}/${giveaway.channelId}/${giveaway.messageId})**\nGood Job On Winning **${giveaway.prize}!**\n DM ${giveaway.hostedBy} to claim your prize!!`) + .setDescription(`<:DotYellow:1002212470812852245> Hello there ${member.user}\n<:DotGreen:1002212464345239643> Host of the giveaway rerolled and you won the Giveaway!\n<:DotGreen:1002212464345239643> Good Job On Winning **${giveaway.prize}!** <:confetti:984296694357319730><:confetti:984296694357319730>\n<:DotGreen:1002212464345239643> DM ${giveaway.hostedBy} to claim your prize!!`) + .setImage('https://i.imgur.com/uQFQGrH.png') .setTimestamp() .setFooter({ text: "©️ IVON", - iconURL: (process.env.FOOTERIMG) + iconURL: ('https://i.imgur.com/sB02Hbz.png') }) ] }).catch(e => {})