MathBot is a discord bot that contains a number of features to help with mathematics.
It's primary features are:
- LaTeX rendering
- Querying Wolfram|Alpha
- A Turing complete calculator
The bot is currently developed for python 3.6.2
.
- Add the bot to your own server
- Command documentation for users
- Support me on Patreon
- Project Trello Board
git clone https://github.com/DXsmiley/mathbot.git
cd mathbot
cp mathbot/parameters_default.json mathbot/parameters.json
pip install -r requirements.txt
Then open parameters.json and change tokens
to the token of the bot used for development. Optionally change the other parameters.
It is strongly recommend that you setup an instance of Redis if you want to use the bot on even a moderate scale. The disk-based keystore is easy to setup but runs very slowly, and as such is only useful of a development tool.
Then navigate into the mathbot
directory and run the bot with python bot.py parameters.json
.
git clone https://github.com/DXsmiley/mathbot.git
cd mathbot
cp mathbot/parameters_default.json mathbot/parameters.json
pip install -r requirements.txt
Then open parameters.json and change tokens
to the token of the bot. Change release
to "production"
. Optionally change the other parameters.
Then navigate into the mathbot
directory and run the bot with python bot.py parameters.json
.
For small changes, feel free to fork the repo and make a pull request once you've made the changes. For larger things, check the Trello board and see if anyone's already working on it. If not, shoot me a message to say that you're working on it so we don't get multiple people doing the same thing.
Yes I use tabs for indentation.
- Grab yourself an API key
- Open parameters.json and change
wolfram > key
.
This should really only be used for development and personal use.
- token : Token to use for running the bot
- wolfram
- key : API key for making Wolfram|Alpha queries
- keystore
- disk
- filename : The file to write read and write data to when in disk mode
- redis
- url : url used to access the redis server
- number : the number of the database, should be a non-negative integer
- mode : Either
"disk"
or"redis"
, depending on which store you want to use. Disk mode is not recommended for deployment.
- disk
- patrons : list of patrons (TODO: Detail how this works)
- automata
- token : token to use for the automata bot
- target : the username of the bot that the automata should target
- advertising
- enable : should be
true
orfalse
. Whentrue
, the bot will occasionally mention the Patreon page when running queries. - interval : the number of queries between mentions of the Patreon page. This is measured on a per-channel basis.
- starting-amount : Can be increased to lower the number of commands until the Patreon page is first mention.
- enable : should be