showing results for - "send embed with webhook in js"
Yohan
17 Jan 2021
1const { Webhook, MessageBuilder } = require('discord-webhook-sender');
2const hook = new Webhook("YOUR WEBHOOK URL");
3
4const embed = new MessageBuilder()
5.setTitle('My title here')
6.setAuthor('Author here', 'https://cdn.discordapp.com/embed/avatars/0.png', 'https://www.google.com')
7.setURL('https://www.google.com')
8.addField('First field', 'this is inline', true)
9.addField('Second field', 'this is not inline')
10.setColor('#00b0f4')
11.setThumbnail('https://cdn.discordapp.com/embed/avatars/0.png')
12.setDescription('Oh look a description :)')
13.setImage('https://cdn.discordapp.com/embed/avatars/0.png')
14.setFooter('Hey its a footer', 'https://cdn.discordapp.com/embed/avatars/0.png')
15.setTimestamp();
16
17hook.send(embed);