Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

send embed with webhook in JS

const { Webhook, MessageBuilder } = require('discord-webhook-sender');
const hook = new Webhook("YOUR WEBHOOK URL");

const embed = new MessageBuilder()
.setTitle('My title here')
.setAuthor('Author here', 'https://cdn.discordapp.com/embed/avatars/0.png', 'https://www.google.com')
.setURL('https://www.google.com')
.addField('First field', 'this is inline', true)
.addField('Second field', 'this is not inline')
.setColor('#00b0f4')
.setThumbnail('https://cdn.discordapp.com/embed/avatars/0.png')
.setDescription('Oh look a description :)')
.setImage('https://cdn.discordapp.com/embed/avatars/0.png')
.setFooter('Hey its a footer', 'https://cdn.discordapp.com/embed/avatars/0.png')
.setTimestamp();

hook.send(embed);
Comment

PREVIOUS NEXT
Code Example
Javascript :: get response from window.open 
Javascript :: phantomjs in angular 
Javascript :: alert by code stackoverflow 
Javascript :: Assume that x is a char variable has been declared and already given a value. Write an expression whose value is true if and only if x is a upper-case letter. 
Javascript :: how to prevent render in react 
Javascript :: vue nexttick 
Javascript :: lodash omitby 
Javascript :: objeto con método javascript 
Javascript :: decapitalize javascript string 
Javascript :: js addeventlistener input search phone 
Javascript :: node js create pdf from html 
Javascript :: vue mixin example 
Javascript :: react function runs several times 
Javascript :: object method in javascript 
Javascript :: slice() in javascript 
Javascript :: assign freemarker expressions to variables 
Javascript :: How to make a JSON call to an URL 
Javascript :: pass arguments into require javascript 
Javascript :: mathjax arrow 
Javascript :: string to query string javascript 
Javascript :: java script append element to array 
Javascript :: set VS Code SSH Remote shell to zsh 
Javascript :: writeFile using stream nodejs from string 
Javascript :: js not startswith 
Javascript :: angular-chart.js 
Javascript :: call by value and call by reference in javascript 
Javascript :: google places autocomplete react native 
Javascript :: create and get all the files in a directory with nodejs 
Javascript :: app script append two list 
Javascript :: npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =