A bot for the Creation Asylum Discord
  • TypeScript 99%
  • JavaScript 0.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2020-09-13 07:38:52 +00:00
.github feat(db): add postgres database 2020-08-15 11:48:17 +01:00
docs/development feat(db): add postgres database 2020-08-15 11:48:17 +01:00
src refactor: remove DI framework 2020-08-18 12:53:56 +01:00
.editorconfig refactor: improvements to codebase 2020-08-14 19:20:34 +01:00
.eslintignore feat(db): add postgres database 2020-08-15 11:48:17 +01:00
.eslintrc.js refactor: remove DI framework 2020-08-18 12:53:56 +01:00
.gitignore quotes system 2020-08-15 19:05:57 +03:00
.markdownlint.yml refactor: improvements to codebase 2020-08-14 19:20:34 +01:00
.markdownlintignore refactor: improvements to codebase 2020-08-14 19:20:34 +01:00
.prettierignore chore: basic app structure 2020-08-04 14:08:26 +01:00
CODE-OF-CONDUCT.md refactor: improvements to codebase 2020-08-14 19:20:34 +01:00
commitlint.config.js refactor: improvements to codebase 2020-08-14 19:20:34 +01:00
CONTRIBUTING.md refactor: improvements to codebase 2020-08-14 19:20:34 +01:00
extensions.json refactor: improvements to codebase 2020-08-14 19:20:34 +01:00
LICENSE.md refactor: improvements to codebase 2020-08-14 19:20:34 +01:00
nodemon.json chore: basic app structure 2020-08-04 14:08:26 +01:00
ormconfig.ts feat(db): add postgres database 2020-08-15 11:48:17 +01:00
package.json refactor: remove DI framework 2020-08-18 12:53:56 +01:00
prettier.config.js refactor: improvements to codebase 2020-08-14 19:20:34 +01:00
Procfile fix: update execution path on Heroku 2020-08-15 13:41:40 +01:00
README.md feat(db): add postgres database 2020-08-15 11:48:17 +01:00
tsconfig.build.json chore: basic app structure 2020-08-04 14:08:26 +01:00
tsconfig.json test: add testing framework with sample test 2020-08-14 19:32:14 +01:00
yarn.lock chore(deps): bump node-fetch from 2.6.0 to 2.6.1 2020-09-13 04:04:38 +00:00

Venom Discord Bot

This is the Discord bot for Creation Asylum.

Development

  • Requires NodeJS, recommend at least the latest LTS version.
  • Requires Yarn, recommend latest stable 1.x
  • Run yarn to install dependencies

VSCode

For VSCode install the following plugins;

You wil also want to use the below configuration in .vscode/settings.json to have Prettier auto-format code for you.

{
  "eslint.packageManager": "yarn",
  "javascript.format.enable": false,
  "editor.formatOnSave": true
}

Environment Variables

At a minimum you need to provide the Discord bots Token (which can be found on the Bot tab of a Discord application), MONGODB_URI and MONGODB_DB_NAME values. See table below for possible values.

key description example
BOT_TRIGGER Prefix of message to let bot know you are speaking to it
DISCORD_BOT_TOKEN Discord bots Token
NODE_ENV What environment the bot is running in production, development or test
LOG_LEVEL What level of logs should be displayed in console error, warn, info, verbose, debug or silly
MONGODB_URI Full connection string for MongoDB database, include db_name if user is scoped to single database mongodb://user:password@localhost:27017/venom_db
MONGODB_DB_NAME The name of the database to use for this project venom_db
DATABASE_URL Full connection string for Postgres database postgres://user:password@localhost:5432/db_name

Bot commands

To add a command you create a Typescript file in src/bot/commands/[filename].ts and ensure it implements the src/bot/commands/ICommand.ts interface. You can see the other files in this directory for implementation examples. Also ensure you export this file in src/bot/commands/index.ts.