Giter VIP home page Giter VIP logo

mrbutler-bot's Introduction

Mr. Butler Bot

Build Status codecov

Setting up your environment

  1. mkvirtualenv mrbutler-bot -p $(which python3)

  2. Edit ${VIRTUAL_ENV}/bin/postactivate as following:

    #!/bin/bash
    # This hook is sourced after this virtualenv is activated.
    
    export MRB_DISCORD_TOKEN="YOUR DISCORD TOKEN HERE"
    export MRB_ENV="dev"
  3. Edit ${VIRTUAL_ENV}/bin/postdeactivate as follows:

    #!/bin/bash
    # This hook is sourced after this virtualenv is deactivated.
    
    unset MRB_DISCORD_TOKEN
    unset MRB_ENV
  4. deactivate and workon mrbutler-bot to load your environment variables

  5. pip install -r requirements-dev.txt to install dev requirements.

  6. Once pip has installed everything correctly, you should run tests to confirm everything is working as expected. Running make test will execute the entire testing suite inside the test docker container.

  7. You're all done! You can use docker-compose up -d --build to start the containers.

Running the bot

You can run the bot directly in your virtualenv or you can use the container that is built by docker-compose. Both depend on those environment variables you already setup, so you can switch back and forth with ease.

Run locally:

  1. workon mrbutler-bot

  2. python ./bot/bot.py

  3. Ctrl-C when done

Run from docker:

  1. workon mrbutler-bot

  2. docker-compose up --build bot

  • You can optionally add -d before --build if you do not mind the container detaching from your session and will docker-compose stop it later on your own.
  1. Ctrl-C when done

mrbutler-bot's People

Contributors

urda avatar

Watchers

James Cloos 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.