Giter Site home page Giter Site logo

pantherhackers / pantherbot Goto Github PK

View Code? Open in Web Editor NEW
14.0 12.0 14.0 5.69 MB

PantherBot is a WebSocket Application that takes advantage of Slack's RTM API to interact with the channels that it is a part of.

License: Mozilla Public License 2.0

Python 100.00%
slack-team bot websocket-application

pantherbot's Introduction

PantherBot

PantherBot is a WebSocket Application that takes advantage of Slack's RTM and Web API to interact with the channels that it is a part of.

Using PantherBot

PantherBot currently has a few commands available to use. These are broken up into action commands and logging commands. All action commands are prefaced with the "!" marker (ie. !coin). Logging commands are prefaced with the "$" marker (ie. $log). Some responses are hard coded to certain phrases (ie. Hey PantherBot).

Current list of action commands:

!help
!coin
!helloworld
!fortune
!catfact
!pugbomb <int>
!taskme
!flip/!rage/!unflip <Optional:String>

Current list of logging commands:

$log <true/false> <optional: list of channels>
$admin <reconnect/update>
$calendar add ; <Title> ; <Date in format YYYY-MM-DD> ; <Start time in format HH:mm> ; <End time in format HH:mm> ; <Description> ; <Location>

To use these commands, in any channel that PantherBot is both present in and may post, start your message with one of the above commands and fill in the arguments as necessary

PantherBot also responds to a few custom messages as well, currently set to:

Hey PantherBot
PantherBot ping
rip PantherBot

As well as messaging them a custom message upon joining the Slack team.

Installing Dependencies

PantherBot requires several python libraries to function. These can be easily installed with the setup.bat or setup.sh file. setup.sh should be run with elevated privileges to ensure dependencies install correctly (this is an issue for most unless you're using a virtualenv) (sudo sh setup.sh should be good enough). Likewise, pip may request your permission or a prompt if using the setup.bat file. If it fails, try using administrative privileges.

Setting up PantherBot

PantherBot is currently relatively easy to set up in your Slack team. Follow the instructions below and it'll be up and running in no time!

  1. Install Python 2.7 if not installed previously.
  2. Run setup.bat (for Windows) or setup.sh (for macOS/Linux) to install dependencies and create the necessary folders.
  3. Go to your Slack team settings and set up a bot configuration, be sure to give it some information, including a username! Copy the API token.
  4. In the secrets folder, make a file called slack_secret.txt that contains only your API token.
  5. Depending on your OS, run either start.bat (Windows) or start.sh (macOS and Linux).
  6. The bot should become active in the slack team. Invite the bot into the channels you would like it to monitor (using the /invite @username command), and off it goes surveying the world!
  7. If there are errors, consider re-running setup.bat or setup.sh in a higher privileged environment to be sure everything is installed properly.
  8. The bot is set up. If you want to edit anything (like the posting name or icon), edit the config folder files to edit things such as:
  • BOT_NAME, BOT_ICON_URL (in bot.txt)
  • SLACK, GOOGLECAL, LOGGING, GOOGLECALSECRET, NEWUSERGREETING, GREETING (in settings.txt)
  • ADMIN (in admin.txt)

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.