clara.js
v1.2.2
Published
Rather useful module that makes sending webhooks to Discord easier.
Downloads
55
Readme
Clara.js
Rather useful module that makes sending webhooks to Discord easier.
Installation
NPM: npm install clara.js
Yarn: Coming soon.
Source: Coming soon.
Example
const { Webhook } = require("clara.js");
const { success } = new Webhook("https://discord.com/api/webhooks/726816892748300378/f66fz9wsCKLILv_nxcPQPGCHazBQsGoguTq4iZ3wnCLO6SQa_7z4OJsRn7PUbtQ_mmV1");
success("Captain Hook", "Hello, world.");
Usage
Initialization:
const { Webhook } = require("clara.js");
const { information, warning, error, success } = new Webhook("https://discord.com/api/webhooks/726816892748300378/f66fz9wsCKLILv_nxcPQPGCHazBQsGoguTq4iZ3wnCLO6SQa_7z4OJsRn7PUbtQ_mmV1");
Information:
information("Captain Hook", "Hello, world.");
Warning:
warning("Captain Hook", "Hello, world.");
Error:
error("Captain Hook", "Hello, world.");
Success:
success("Captain Hook", "Hello, world.");
Message Builder
Example:
const { Webhook } = require("clara.js");
const { MessageBuilder, send } = new Webhook("https://discord.com/api/webhooks/726816892748300378/f66fz9wsCKLILv_nxcPQPGCHazBQsGoguTq4iZ3wnCLO6SQa_7z4OJsRn7PUbtQ_mmV1");
const message = new MessageBuilder();
messsage.setName("Captain Hook");
message.setColor("#7289DA");
message.setText("Hello, world.");
send(message);
Badges
License
This project is placed under an MIT License.