This repository contains a simple Node.js application that allows you to send messages and embeds to a Discord channel using a webhook. The application is configured using a json file, making it easy to customize the messages and embeds you send.
Before using this application, ensure you have the following installed:
- Node.js (version 12 or higher)
- npm (Node.js package manager)
- Clone this repository to your local machine:
> git clone https://github.com/Vumacc/discord-webhook-message-sender.git- Navigate to the project directory
> cd discord-webhook-message-sender- Install all dependencies
> npm installOpen config.json in your preferred text editor and configure the following values:
{
"id": "webhook ID",
"token": "webhook Token",
"username": "username here",
"avatarUrl": "URL for webhook avatar",
"message": "message to send (required)",
"includeEmbed": "true or false",
"embedTitle": "embed title",
"embedDescription": "embed content"
}- Replace the values of
idandtokenwith your actual Discord webhook ID and Token - Replace the values of
username,avatarUrl, andmessagewith the correct content - The value of
includeEmbedmust be either "true" or "false" - If needed, replace the values of
embedTitleandembedDescriptionwith the correct content
As described before, this allows you to send a message and/or embed from a Discord webhook.
After configuring the application, use this command to send the message to where the webhook resides:
> node index.js