0.2.0 • Published 2 years ago
@cosmos-xyz/cosmos v0.2.0
cosmos
Feature-rich extendable revolt.js framework
Examples
- Javascript / ES6
import { CosmosClient } from "@cosmos-xyz/cosmos";
const client = new CosmosClient();
client.on("ready", () => {
console.log(`Logged in as ${client.user.username}`);
});
client.on("message", (message) => {
if(message.content === "?ping") message.reply({ content: "Pong!" });
})
client.login(LOGIN_DETAILS);
- Typescript
import { CosmosClient } from "@cosmos-xyz/cosmos";
const client = new CosmosClient();
client.on("ready", () => {
console.log(`Logged in as ${client.user!.username}`);
});
client.on("message", (message) => {
if(message.content === "?ping") message.reply({ content: "Pong!" });
})
client.login(LOGIN_DETAILS);
Installation
- @cosmos-xyz/cosmos
npm i @cosmos-xyz/cosmos
- revolt.js
npm i revolt.js