Git Product home page Git Product logo

upbeat's Introduction

upbeat

This a plugin for Slack's demonstration bot that plays a really basic RPG with anyone in the channel.

To run it, you need python-rtmbot: https://github.com/slackhq/python-rtmbot Install and configure it as described in their docs. You'll need a Slack account and the ability to create a bot user to get very far.

Then install rpgbot.py from this repo in plugins/ or plugins/rpgbot/

It loads a config file called gameconfig.json in the rtmbot's working directory that should have the following stuff:

  • RPGCHANNEL: the ugly Slack channel ID for the channel to use for the game (e.g. C123456789)
  • DEBUG: true or false as you see fit
  • SLACK_KEY: a Slack API key, preferably the same one you use for the rtmbot config
  • IGNORELIST: [] of the user IDs (e.g. U123456789) you want to ignore. Sticking the bot's user ID in there is probably a good idea.

cli

You can run this on a commandline using cli.py. You should have a venv set up with requests installed (pip install -r pip-requirements.txt). The brute-force input handling (stolen blatantly from a google result for "python non blocking input") will only work on unix-ish platforms (including osx) and won't work from the console of an IDE.

Note also that you can't do the private-message commands this way, just the public ones -- they all begin with an exclamation point.

Note 2: You REALLY REALLY want to turn off DEBUG in game.py before running the CLI.

upbeat's People

Contributors

jurph avatar

Watchers

James Cloos avatar  avatar

Forkers

rampion

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.