const DBL = require("dblapi.js"); const dbl = new DBL(process.env.TOPGG_AUTH, { webhookPort: 4000, webhookAuth: process.env.TOPGG_AUTH }, client); dbl.on("posted", () => { console.log("DBL", "Server count posted!"); }); dbl.on("error", (e) => { console.log(`Oops, looks like there was an error. ${e}`); }); dbl.webhook.on("ready", (hook) => { console.log(`Successfully running webhook at port: http://${hook.hostname}:${hook.port}${hook.path}`); }); dbl.webhook.on("vote", (vote) => { const channel = client.channels.cache.get("861678397574742076"); const embed = new EmbedBuilder() .setTitle("__Thanks for voting!__") .setDescription(`⭐ **Voter: **\n<@${vote.user}>\n\nšŸ”— **Vote Link:**\n${botconfig.VOTE_LINK}\n\n**Vote Source:** Top.gg`) .setFooter("ā¤ You can vote again in 12hrs!") .setTimestamp() .setColor("EE1C25") .setThumbnail("https://media.discordapp.net/attachments/858548338236325928/866515597592363048/image0.jpg"); channel.send({ embeds: [embed] }); });