Giter VIP home page Giter VIP logo

joshs-special-bot's Introduction

Josh's Special Bot

Typescript Supported PNPM Run Test Suite Linting DiscordJS Version Jest Version

Setup

Environment Secrets

  • Create your own .env file in the root, setting the following variables:

    • NODE_ENV, should be one of development or production
    • DISCORD_CLIENT_ID, same as the application ID
    • DISCORD_TOKEN
    • The below keys can be found in the ORM section of the "Connect to your project" modal
    • DATABASE_URL, recommended to append ?pgbouncer=true to the end for a better prisma CLI experience
    • DIRECT_URL, for running migrations

Database migrations

The DB should already be set up, but incase you are using a different one to our shared supabase testbench, run:

npx prisma db push

If you edit the schema, apply your edit as a migration with this command (it will also push the update to the backend):

npx prisma migrate <ENV> --name <useful_migration_comment>

Running the program

Run Development Build Locally

  1. Install pnpm globally via npm:
    npm install -g pnpm

  2. Install tsx globally:
    pnpm install -g tsx

  3. Install project dependancies:
    pnpm install

  4. Start the bot on your local machine using:
    pnpm run start
    or
    pnpm run start:watch (restarts upon file changes)

Docker Deployment

The robot can be run within a docker container using docker-compose. This includes either building the CI pipeline container for running tests or the deploy container for running the robot that is the same of what is used on the server.\

  1. Ensure you have docker installed and running first.

  2. To run a robot, build and run it:

    1. docker-compose build <ci/deploy>
    2. docker-compose run <ci/deploy>

You will know you did everything right when your robot will be connected to discord and running! ๐ŸŽ‰

joshs-special-bot's People

Contributors

joshua-crews avatar willjeynes avatar kiwihour avatar 2004seraph avatar dependabot[bot] avatar mergifyacct avatar mergify[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.