All Projects → DXsmiley → Mathbot

DXsmiley / Mathbot

Licence: gpl-3.0
Discord bot for mathematics

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Mathbot

Master Bot
A Discord music bot with playlist support, music quiz, saved playlists, lyrics, gifs and more
Stars: ✭ 204 (-1.45%)
Mutual labels:  bot, discord-bot, discord
Carl Bot
Bot for discord using discord.py (outdated code)
Stars: ✭ 160 (-22.71%)
Mutual labels:  bot, discord-bot, discord
Modmail
A feature-rich Discord bot for easy communication between server staff and users.
Stars: ✭ 115 (-44.44%)
Mutual labels:  bot, discord-bot, discord
Dtel
Telephone roleplay bot on Discord
Stars: ✭ 108 (-47.83%)
Mutual labels:  bot, discord-bot, discord
Mirai
The core for Mirai Bot v4 [Deprecated]
Stars: ✭ 142 (-31.4%)
Mutual labels:  bot, discord-bot, discord
Discord.js Musicbot Addon
This DOES NOT WORK any more. This repo only serves as an archive for is anyone wants to pickup my work. You may still join the discord however.
Stars: ✭ 109 (-47.34%)
Mutual labels:  bot, discord-bot, discord
Discord.ts
🤖 Create your discord bot by using TypeScript and decorators!
Stars: ✭ 172 (-16.91%)
Mutual labels:  bot, discord-bot, discord
Pengubot
Official PenguBot GitHub Repository
Stars: ✭ 98 (-52.66%)
Mutual labels:  bot, discord-bot, discord
Poketwo
A Discord bot.
Stars: ✭ 139 (-32.85%)
Mutual labels:  bot, discord-bot, discord
Calypsobot
A fully customizable bot built with discord.js
Stars: ✭ 131 (-36.71%)
Mutual labels:  bot, discord-bot, discord
Lenoxbot
🖥️ LenoxBot is a Discord bot that offers many cool new features to your Discord server!
Stars: ✭ 163 (-21.26%)
Mutual labels:  bot, discord-bot, discord
Octave
Discord bot written in Java and Kotlin using JDA.
Stars: ✭ 156 (-24.64%)
Mutual labels:  bot, discord-bot, discord
Sir Lancebot
A Discord bot started as a community project for Hacktoberfest 2018, later evolved to an introductory project for aspiring new developers starting out with open source development.
Stars: ✭ 105 (-49.28%)
Mutual labels:  bot, discord-bot, discord
Discord Panel
📊 User friendly dashboard/tool for discord bot developpers to manage servers
Stars: ✭ 116 (-43.96%)
Mutual labels:  bot, discord-bot, discord
Music Bot
Simple music bot with a full-blown queue system that is easy to understand
Stars: ✭ 102 (-50.72%)
Mutual labels:  bot, discord-bot, discord
Bot
An open-source and self-hosted ticket management bot for Discord - a free alternative to the premium and white-label plans of other popular ticketing bots.
Stars: ✭ 122 (-41.06%)
Mutual labels:  bot, discord-bot, discord
Discord.js Menu
💬 Easily create Discord.js v12 embed menus with reactions and unlimited customizable pages.
Stars: ✭ 89 (-57%)
Mutual labels:  bot, discord-bot, discord
Discordbot
A Java Discord bot using JDA
Stars: ✭ 92 (-55.56%)
Mutual labels:  bot, discord-bot, discord
Discord.js
discord.js is a powerful Node.js module that allows you to easily interact with the Discord API.
Stars: ✭ 16,432 (+7838.16%)
Mutual labels:  bot, discord-bot, discord
Amongcord
Among Us Discord Bot | Discord bot for controlling voice channels during Among Us matches
Stars: ✭ 144 (-30.43%)
Mutual labels:  bot, discord-bot, discord

MathBot

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.4.

Links

Setup for use

git clone https://github.com/DXsmiley/mathbot.git
cd mathbot
cp mathbot/parameters_default.json mathbot/parameters.json
pipenv --python 3.6
pipenv install --skip-lock

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 entrypoint.py parameters.json.

Setup for development

git clone https://github.com/DXsmiley/mathbot.git
cd mathbot
cp mathbot/parameters_default.json mathbot/parameters.json
pipenv --python 3.6
pipenv install --dev --skip-lock

Then open parameters.json and change tokens to the token of the bot. Change release to development. Optionally change the other parameters.

Then navigate into the mathbot directory and run the bot with python entrypoint.py parameters.json.

Contributing guide

Relevent discussion takes place on the MathBot Discord server.

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.

Setting up Wolfram|Alpha

  1. Grab yourself an API key
  2. Open parameters.json and change wolfram > key.

This should really only be used for development and personal use.

Test Suite

Use the test script in side the mathbot folder to run the test suite.

Some of the tests require that a bot is running and connected to Discord. To enable them, use the --run-automata command line argument. In addition a file with the necessary tokens filled out needs to be provided to the --parameter-file argument. To get all tests running, the token, automata and wolfram parameters need to be filled out.

For the sake of example, I run my tests with the command ./test --run-automata --parameter-file=dev.json. You should replace dev.json with a path to your own parameter file.

There are some additional tests that require a human to verify the bot's output. These can be enabled with --run-automata-human.

Guide to parameters.json

  • release : Release mode for the bot, one of "development", "beta" or "production"
  • 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.
  • patrons : list of patrons
    • Each key should be a Discord user ID.
    • Each value should be a string starting with one one of "linear", "quadratic", "exponential" or "special". The string may contains additional information after this for human use, such as usernames or other notes.
  • analytics : Keys used to post information to various bot listings.
  • automata
    • token : token to use for the automata bot
    • target : the username of the bot that the automata should target
    • channel: the ID of the channel that the tests should be run in
  • advertising
    • enable : should be true or false. When true, 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.
  • error-reporting
    • channel: ID of channel to send error reports to.
    • webhook: Webhook to send error reports to.
  • shards
    • total: The total number of shards that the bot is running on.
    • mine: A list of integers (starting at 0) specifying which shards should be run in this process.

Additional Installation Issues (Ubuntu only)

If you don't have python 3.6

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.6

If you have installation troubles with cffi or psutil

sudo apt-get install python3.6-dev
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].