Skip to content

makayla-moster/HammerBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Contributors GitHub top language GitHub issues License

HammerBot is a discord bot built for an Age of Empire II streamer's discord server. HammerBot features Age of Empires II specific commands, such as !whichciv <techName> which returns a list of civs that get that specific technology in-game.

Specific features include:

  • Team civilization randomizer for 2v2s, 3v3s, and 4v4s that takes into account pocket or flank positions
  • Finding out if a civilization has a specific technology or unit
  • Returning in-game taunts
  • Player rank and match commands with info pulled from the aoe2.net API
  • And more!

Python Package

HammerBot is built with Discord.py, an API wrapper for Discord.

Other packages/libraries used include:

  • asyncio
  • aiohttp

HammerBot currently has a very simple setup, where all features are split into their own cogs.

Issues & Bugs

If a bug or any unintended behavior is discovered, please report it by creating an issue here.

HammerBot Development

If you'd like to contribute code to HammerBot, please:

  1. Follow the setup guidelines & fork the repository
  2. Make any contributions in your fork
  3. Create a pull request

Your pull request will then be reviewed. Please read the Contributing Guidelines before creating your first pull request.

Setting Up HammerBot

Get a Discord Bot Token

  1. Get a Discord bot token by going to the Discord Developers website (you'll have to login)
  2. Create an Application & click Bot in the left sidebar
  3. Create a bot - the name you put will be seen in the servers
  4. Copy the token from this page and hold onto it

Prepare your Bot for your Server Connection

  1. Click OAuth2 from the left sidebar
  2. Under Scopes, check bot
  3. In Bot Permissions select administrator under General Permissions
  4. Copy the link from the Scopes section and open it in a new tab
  5. Select the server you want to add the bot to

Prepare your Repository

  1. Fork this repository
  2. git clone HammerBot, and cd into the HammerBot directory
  3. Make a new file called .env and fill in the fields based off the .env.example file

Setup & Run your HammerBot

  1. Setup venv with pip3 install virtualenv (mac/linux) or py -m pip install --user virtualenv (windows)
  2. Then run virtualenv venv (mac/linux) or py -m venv venv (windows)
  3. Enter the virtual environment with source venv/bin/activate (mac/linux) or .\venv\Scripts\activate (windows)
  4. Then let pip get the latest libraries with pip3 install -r requirements.txt (mac/linux) or py -m pip install -r requirements (windows)
  5. Then test run your HammerBot with python3 -m hammerbot.py (mac/linux) or py -m hammerbot.py (windows) in the main directory
  6. The bot should show up in your server and respond to commands such as 11

Releases

No releases published

Packages

No packages published

Languages