Git Product home page Git Product logo

community-bot's Introduction

BNETDocs Community Bot (BCB)

Build Status Python 3.6 | 3.7

A WIP community-built bot written in Python (3.6) for the classic Battle.net v1 chat platform.

Join us on Discord: https://discordapp.com/invite/u87WVeu

API Keys

The classic Battle.net chat API requires a key to use. You can obtain one by logging in to one of the classic games (StarCraft, Diablo 2, or WarCraft 3) and going to your preferred clan or op channel and using the /register-bot command. You will need to have an email registered to your account and click the activation link in the email.

Running the command again will send you a new key and invalidate the old one.

Installing the bot (and running for the first time)

  • Download and install Python v3.6.7
  • Clone or download the community-bot repository. If you downloaded a zip/archive, extract the contents.
  • Open a console and navigate to the directory with the downloaded files. You may want to setup a python virtual environment.
  • Run the setup script with the command python setup.py install - this will install the required dependencies
  • Use the command python -m bnetbot --apikey=<your api key> to run the bot and create a new profile with your API key. If you don't want your API key in the console log you can copy the config.example.json file to config.json and insert your API key there.

Running the bot normally

Once you've run the bot with the --apikey argument or manually created a profile, you can run the bot normally by using python -m bnetbot, which will pull your settings from the default config file.

Optional command-line arguments:

  • --config=/path/to/config.json: specifies an alternate path to your config file
  • --debug: enables printing of debug messages
  • --apikey=abcdefg: creates a new profile with the specified API key

Adding users to the bot

By default the bot comes with 3 internal groups:

  • admin: access to all commands and can add/remove other users
  • moderator: access to channel moderation functions (ban, kick, etc)
  • user: access to other general purpose commands

To add a user to the bot, use the following command from the bot console: /perms group <group> add <user>. For example, to add the user 'bob' to the 'admin' group you'll use: /perms group admin add bob.

To remove a user from the bot, use the command: /perms user <user> remove.

These commands can also be done by any user in the admin group. Commands can be used in the channel or through whispers, using the trigger ! instead of the slash /.

community-bot's People

Contributors

carlbennett avatar davnit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

inrg

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.