Giter Site home page Giter Site logo

cfvg-discordbot's Introduction

cfvg-discordbot (Version: 0.4)

Discord Bot for Cardfight Vanguard

Running locally

*Running locally means you have to keep the python window open else the bot dies. Run on heroku to keep it alive.

  1. Install Python 3.5 or higher

  2. Install discord.py (python -m pip install -U discord.py)

  3. Follow reactiflux's instructions

  4. Clone or Download then extract this repository

  5. Create a new file called "token.key", then paste the token generated from step 3 into the file (one line only)

  6. The vanguard database is not installed by default. Run this to get the most recent:

    import getcardinfo
    getcardinfo.updatedb(True)
  7. Run cfvgbot.py and enjoy!

Running on heroku

  1. Install Python 3.5 or higher

  2. Sign up for a free heroku account

  3. run "pip install virtualenv"

  4. Download and install the heroku CLI

  5. Command line stuff. Mostly from the tutorials:

    heroku login
    
    git clone https://github.com/NanoSmasher/cfvg-discordbot.git
    cd cfvg-discordbot
  6. Follow reactiflux's instructions

  7. Create a new file called "token.key", then paste the token generated from step 3 into the file (one line only)

  8. The vanguard database is not installed by default. Run this to get the most recent:

    import getcardinfo
    getcardinfo.updatedb(True)
  9. Try this:

    heroku create
    git push heroku master
    heroku ps:scale web=1
Troubleshooting

You should see your app on the dashboard. I had to turn on the free dyno feature. If you did some edits you'll need to update with:

git commit -a
git push heroku master

you can find logs in that specific app with:

heroku logs -n 20
heroku logs -t

Features

  • Hypergeometric Calculator for calculating card probabilities
    • accepts BEDMAS operations using a shunting yard algorithm and reverse polish notation (rpn) interpreter, with custom operators
    • avoids standard "eval" for safety
  • Card Effects
    • submits a search request to cf-vanguard.com/cardlist DEPRECIATED
    • pulls data from the cf-vanguard card page
    • pulls data from the cardfight wiki

Commands

vbot cascadeodds vbot hgcc vbot quickodds vbot eval

* [[card name]] *

cfvg-discordbot's People

Contributors

nanosmasher avatar

Watchers

 avatar  avatar  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.