Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.
/ cx-bot Public archive

a discord bot using the sapphire framework as well as discord.js

License

Notifications You must be signed in to change notification settings

nmathira/cx-bot

Repository files navigation

CxBot

A Discord Bot based on Discord.js and the Sapphire Framework

Codacy Badge

CxBot is a Discord bot that allows me to automate and improve many aspects of Discord.

to run

  1. Install dependencies with npm i

  2. Fill out a new file called .env with the template in .env.schema

  3. Run tsc and compile the project

  4. If the compilation succeeded, proceed to run the bot by doing node dist &

  5. If you want to work with trello integration, you will need a postgres database. Use prisma to generate the tables and such. To do that,

    1. Set the database url in the .env file. It should look something like: DATABASE_URL="postgres://{user}:{password}@{location[localhost]}:{port}/{dbname}&schema={schema type [probably public]}"

    2. After, run npx prisma migrate dev --name init

    3. Now, to get the client run npm install @prisma/client

    4. If you plan on changing the database, you will need to migrate the structure with npm install @prisma/client

Architecture

./src/                  Root directory.
  |-bot/                Sapphire specific directory.
  | |-arguments/        Custom arguments for commands.
  | |-commands/         Commands.
  | |-listeners/        Event listeners.
  | |-preconditions/    Preconditions for commands.
  | |-tasks/            Tasks running on cron intrevals.
  |-lib/                Util and backend logic.
  | |-extensions/       Classes that extend library classes.
  | |-Task/             Task's piece and store.
  | |-utils/            General utility functions.
  |-prisma/             Prisma & database specific files.
  |-typings/            Custom typescript types.

About

a discord bot using the sapphire framework as well as discord.js

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published