Socket
Socket
Sign inDemoInstall

elara-hook

Package Overview
Dependencies
1
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    elara-hook

Webhook Service for Discord.. to send messages, embeds. With customizable username & avatar functions


Version published
Weekly downloads
17
Maintainers
1
Install size
2.02 MB
Created
Weekly downloads
 

Readme

Source

Elara Webhooks Builder & Sender.

const Service = require("elara-hook");
const Webhook = new Service("WEBHOOK URL HERE");

Webhook
.setContent("Content") // Content of the message.
.setMention("<@userid> or <@&roleid>") // Mentions the user or role at the start of the message content.
.setAvatar("Image URL") // Sets the avatar icon for the webhook
.setUsername("Discord") // Sets the username for the webhook.
.setTitle("Title") // Title of the embed
.setDescription("Description") // Description of the embed
.setAuthor("Name", "Image", "LINK") // Author of the embed
.setColor("#ff0000") // or `.setColour("#ff0000")` Color of the embed
.setFooter("Name", "Image") // Footer of the embed
.setThumbnail("Image URL") // Thumbnail of the embed
.setImage("Image URL") // Image of the embed
.addField("Name", "Value", true) // Adds a field to the embed, max 25
.addBlankField(true) // Adds a blank field to the embed, true, false to make it inline
.setTimestamp(optional_time) //  Adds the timestamp to the embed.
.setURL(`URL`) // Adds the url for the title.
.send() // Sends the message/embed.

FAQs

Last updated on 15 May 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc