1.3.6 • Published 2 years ago

ch.api.js v1.3.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

ch.api.js

Chat Application Programming Interface, or ch.api.js, is a package built to connect chat applications. Think of it as Discord.js, but built to work not only on Discord, but Revolt, Telegram, and more.

Installation

npm install ch.api.js

Example Usage

const { Client } = require("ch.api.js");
const config = require("./config.json");

// Create the ch.api client with a prefix.
const client = new Client({
    prefix: "ch."
});

// The "ready" event is called whenever a client is ready.
// This means that it gets called once for Discord, once for Revolt, once for Telegram, etc.
client.on("ready", (client) => {
    console.log(`Logged into ${client.name.toUpperCase()}!`);
});

// The "message" even is called whenever a message is recieved.
client.on("message", async (message, client) => {
    console.log(`${client.name} message: ${message.author.username} said "${message.content}"`);
});

// This logs into any clients that have a token supplied.
client.login({
    telegramToken: config.tokens.telegram,
    discordToken: config.tokens.discord,
    revoltToken: config.tokens.revolt
});

Support

Support Server Invites

Telegram Support Server Discord Support Server Revolt Support Server

Bot Invites

Telegram Bot Invite Discord Bot Invite Revolt Bot Invite

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago