1.0.0 • Published 4 years ago

@ernest05/discord-webhook v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Discord Webhook

A simple wrapper written in TypeScript, to send webhooks to the Discord API.

Installation:

# Yarn
yarn add @ernest05/discord-webhook

# NPM
npm install @ernest05/discord-webhook

Webhook client creation:

'use strict';
// Importation of the module
const { WebhookClient } = require('@ernest05/discord-webhook');
// Creation of the webhook client
const webhook = new WebhookClient(webhookID, webhookToken);

You can find webhook ID and token in the channel settings where the webhook is. Click on edit for the concerned webhook, and copy the provided link.Webhook ID looks like this: 679425647550136340Webhook token looks like this: 1vEmEQcMQSef5yVjgf8IFtgNBg8nu81zVmWrkMUK2SDCKOoZywtTQwpWjvXshHWQ0H4Y

Send messages or embeds by the way of the webhook:

'use strict';

const { WebhookClient, EmbedBuilder } = require('@ernest05/discord-webhook');
const webhook = new WebhookClient(webhookID, webhookToken);

// Execution of the webhook
webhook.send(options);

Looking for help?

You need help concerning the module usage? I invite you to join the Discord support server here to ask help, someone will help you as soon as possible.

Report an issue:

If you encounter any issue with the module, please report it by opening an issue on the repository. Thanks in advance for your contribution!

1.0.0

4 years ago