Webcord
Webcord is an easy to use, Discord compliant webhook module for Node.js, featuring a simplistic design inspired by Discord.js message embeds.
It ships with Typescript support by default (no need to create those pesky typings), and requires zero dependencies!
Installation
Using npm:
npm install webcord
Examples
The code below features every method built into Webcord. Think of it as the documentation. Highlighting over the code in Visual Studio Code also shows what the methods do.
Posting to a Webhook
const webcord = url: "https://discordapp.com/api/webhooks/712433174063349761/-YgMVHCyQlfxval8rwJYO79CuJjrIj1jwAqePLluBgfQseU0FFH1GhEeiJf8bxnmfWOQ" // Discord webhook url name: "Webcord v2.0.0" // Webhook display name avatar: "https://cdn.clipart.email/401241ecd4daff63d501b958f75a734b_discord-logo-icon-293532-free-icons-library_250-250.png" // Webhook display avatar // Configures the webhook // Sets an embed title // Sets an embed description // Adds an embed field (max 25 fields) // Adds multiple fields at once (max 25 fields) // Sets an embed author // Sets an embed footer // Adds a URL to the embeds title // Sets the image of the embed // Sets the timestamp of the embed // Sets an embed color // Creates another embed // Creates a title on the new embed /*Every webcord message must use the .send() method at the end to fire the POST request.It also supports a promise which returns request information after the POST request is sent out.*/
The above code outputs this:
Contributing
Webcord Contributors can be found here! Want to contribute? Follow the Contributing Guide!