1.0.0-alpha.9 • Published 2 years ago

pure-cat v1.0.0-alpha.9

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Pure Cat

A Modular Discord Bot (Framework).

Features

  • Write slash commands declaration and implementation in one place.
  • Modular usage.
// run the bot
import { Bot } from "pure-cat";
import { Marquee } from "./module/marquee";
import { EventLog } from "./module/event-log";
import { DNS } from "./module/dns";
import { LoggerControl } from "./module/logger-control";
import { BOT_ID, STORAGE, BOT_TOKEN } from "./config";

new Bot(BOT_ID, STORAGE)
    .use(new EventLog())
    .use(new Marquee(["/log-dump", "/dns"]))
    .use(new DNS())
    .use(new LoggerControl())
    .login(BOT_TOKEN);
// register slash commands
import { Bot } from "pure-cat";
import { DNS } from "./module/dns";
import { LoggerControl } from "./module/logger-control";
import { BOT_ID, STORAGE, BOT_TOKEN } from "./config";

new Bot(BOT_ID, STORAGE)
    .use(new DNS())
    .use(new LoggerControl())
    .register(BOT_TOKEN);

Docker

First, create an .env file with the following contents:

BOT_ID=<YOUR_BOT_ID>
BOT_TOKEN=<YOUR_BOT_TOKEN>

Then, run:

docker compose up -d

Every thing should just work.