1.2.2 • Published 4 years ago

clara.js v1.2.2

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

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

NPM

License

This project is placed under an MIT License.

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.7

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago