{"id":13456166,"url":"https://github.com/DXsmiley/mathbot","last_synced_at":"2025-03-24T09:31:35.347Z","repository":{"id":42187477,"uuid":"72078696","full_name":"DXsmiley/mathbot","owner":"DXsmiley","description":"Discord bot for mathematics","archived":false,"fork":false,"pushed_at":"2024-08-03T02:57:18.000Z","size":3967,"stargazers_count":278,"open_issues_count":36,"forks_count":49,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-28T23:33:52.641Z","etag":null,"topics":["bot","discord","discord-bot","discord-py"],"latest_commit_sha":null,"homepage":"https://dxsmiley.github.io/mathbot/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DXsmiley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-27T06:39:11.000Z","updated_at":"2024-09-10T14:59:06.000Z","dependencies_parsed_at":"2024-01-13T17:48:39.634Z","dependency_job_id":"7178de54-2fea-4a40-aff9-8b1e048c3ba1","html_url":"https://github.com/DXsmiley/mathbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DXsmiley%2Fmathbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DXsmiley%2Fmathbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DXsmiley%2Fmathbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DXsmiley%2Fmathbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DXsmiley","download_url":"https://codeload.github.com/DXsmiley/mathbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245243316,"owners_count":20583605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","discord","discord-bot","discord-py"],"created_at":"2024-07-31T08:01:17.158Z","updated_at":"2025-03-24T09:31:34.601Z","avatar_url":"https://github.com/DXsmiley.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# MathBot\n\nMathBot is a discord bot that contains a number of features to help with mathematics.\n\nIt's primary features are:\n- LaTeX rendering\n- Querying Wolfram|Alpha\n- A Turing complete calculator\n\nThe bot is currently developed on python `3.8.10`, but should work on later versions of Python.\n\n## Links\n\n- [Add the bot to your own server](https://dxsmiley.github.io/mathbot/add.html)\n- [Official Discord Server](https://discord.gg/JbJbRZS)\n\n## Setup for use\n\n```bash\ngit clone https://github.com/DXsmiley/mathbot.git\ncd mathbot\ncp mathbot/parameters_default.json ./parameters.json\npython3.8 -m venv .venv # or later version\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\nThen open parameters.json and change `tokens` to the token of the bot used for development. Optionally change the other parameters.\n\nIt 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.\n\nRun the bot with `python -m mathbot parameters.json`.\n\n## Setup for development\n\nFollow above instructions, but additionally run `pip install -r dev_requirements.txt`\n\n## Contributing guide\n\nRelevent discussion takes place on [the MathBot Discord server](https://discord.gg/JbJbRZS).\n\n## Setting up Wolfram|Alpha\n\n1. [Grab yourself an API key](https://products.wolframalpha.com/api/)\n2. Open parameters.json and change `wolfram \u003e key`.\n\nThis should really only be used for development and personal use.\n\n## Test Suite\n\nInvoke `pytest` to run the test suite.\n\n~~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.~~\n\n~~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.~~\n\n~~There are some additional tests that require a human to verify the bot's output. These can be enabled with `--run-automata-human`.~~\n\n## Guide to `parameters.json`\n\n- *release* : Release mode for the bot, one of `\"development\"`, `\"beta\"` or `\"production\"`\n- *token* : Token to use for running the bot\n- *wolfram*\n\t- *key* : API key for making Wolfram|Alpha queries\n- *keystore*\n\t- *disk*\n\t\t- *filename* : The file to write read and write data to when in disk mode\n\t- *redis*\n\t\t- *url* : url used to access the redis server\n\t\t- *number* : the number of the database, should be a non-negative integer\n\t- *mode* : Either `\"disk\"` or `\"redis\"`, depending on which store you want to use. Disk mode is not recommended for deployment.\n- *patrons* : list of patrons\n\t- Each *key* should be a Discord user ID.\n\t- 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.\n- *analytics* : Keys used to post information to various bot listings.\n\t- *carbon*: Details for [carbonitex](http://carbonitex.net/)\n\t- *discord-bots*: API Key for [bots.discord.pw](https://bots.discord.pw/#g=1)\n\t- *bots-org*: API Key for [discordbots.org](https://discordbots.org/)\n- *automata*\n\t- *token* : token to use for the automata bot\n\t- *target* : the username of the bot that the automata should target\n\t- *channel*: the ID of the channel that the tests should be run in\n- *advertising*\n\t- *enable* : should be `true` or `false`. When `true`, the bot will occasionally mention the Patreon page when running queries.\n\t- *interval* : the number of queries between mentions of the Patreon page. This is measured on a per-channel basis.\n\t- *starting-amount* : Can be increased to lower the number of commands until the Patreon page is first mention.\n- *error-reporting*\n\t- *channel*: ID of channel to send error reports to.\n\t- *webhook*: Webhook to send error reports to.\n- *shards*\n\t- *total*: The total number of shards that the bot is running on.\n\t- *mine*: A list of integers (starting at `0`) specifying which shards should be run in this process.\n\n## Additional Installation Issues (Ubuntu only)\n\nIf you don't have python 3.8\n```\nsudo add-apt-repository ppa:deadsnakes/ppa\nsudo apt update\nsudo apt install python3.8\n```\n\nIf you have installation troubles with cffi or psutil\n```\nsudo apt-get install python3.8-dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDXsmiley%2Fmathbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDXsmiley%2Fmathbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDXsmiley%2Fmathbot/lists"}