Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require('discord.js')
- const client = new Discord.Client()
- const DBL = require('dblapi.js');
- const dbl = new DBL(process.env.DBLTOKEN, { webhookPort: 3000, webhookAuth: process.env.AUTH });
- dbl.webhook.on('ready', hook => {
- console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`)});
- dbl.webhook.on('vote', vote => {
- const uservoted = client.users.get(vote.user).username
- var voted = new Discord.RichEmbed()
- .setTitle(`${uservoted} has just voted for Ticketz!`)
- .setColor('GREEN')
- client.users.get("510970297814614016").send(voted)
- const user = new Discord.WebhookClient(process.env.WEBID, process.env.WEBTOKEN)
- user.send(voted);
- });
- client.login(process.env.TOKEN)
Advertisement
Add Comment
Please, Sign In to add comment