Bot for Slack built in Python by Misha Larionov, ported to Discord by Nicholas Carr
This is a side project of mine, which hopefully will make it easy to keep track of ideas my team has for upcoming hackathons. Feel free to use the code, but please credit me (preferably via direct link to this repo). I try to comment it where possible. This is still very unstable, so if you would like to make a pull request, please just submit an issue. The master branch is the version built for Slack.
Pybot now requires the async branch of discord.py and consequently Python >= 3.4 Pybot now requires github3.py and there is a new line you need to add to your cfg
Incompatible with user accounts, the bot must run on a bot account. If that's too much hassle for you, click here to rely on our running instance of the bot.
Note: All commands must be prefaced with "@pybot"
Enters an idea. Make sure there is a space after the colon
Gets an idea. Must be a name, not an @mention. Omit the name parameter to get your own ideas.
Deletes the n th idea in your list of ideas. It is recommended to call !getideas first.
Deletes ALL your ideas. Use with caution.
Returns a summary of the Wikipedia page for query
Displays information about the machine running the bot
Keeps future ideas from channel separate and private to the channel
Makes ideas from channel available to other channels
Has pybot respond with response whenever a message matches call
Deletes response for call
Gets all responses
Deletes ALL responses
Pybot leaves the server :(
(Only the owner can use this)
Displays version info and a list of commands
NOTE: If you would like to add pybot to your server click here instead.
Unless you REALLY want to run your own bot, you can rely on the instance run by me.
-
Install Python >= 3.4
-
Install the async branch of discord.py. You can do this through pip if you have git installed:
pip install git+https://github.com/Rapptz/discord.py -
Install the following libraries (
pip install <name>). Alternatively, run dependencyInstaller.py
- asyncio
- requests
- dateparser
- wikipedia
- github3.py
-
Set up a Discord bot user (Not a regular user. To set up a bot user click here)
-
Place bot.py in whichever folder you want it to run in.
-
Create a file named "cfg.py" in the same folder. The file should look like this:
TOKEN = "<redacted>"
KILLERIDS = "<ids>" #Table of people who can force quit the bot
GITHUBCHANNEL = "<channel id where you want GitHub notifications>" #Remove these last two lines to disable GitHub integration
REPOS = [["owner", "repo"], ["MishaLarionov", "pybot"]] #One, none or manyNow you're ready to run the bot! If you get any errors you've probably done something wrong in the config file.
- Preliminary GitHub notifications
- New UI/UX
- New command prefixes
- Stock lookup
- No longer responds to bots