{"id":25368684,"url":"https://github.com/mlian031/pi","last_synced_at":"2026-04-10T01:04:28.754Z","repository":{"id":46065218,"uuid":"330505079","full_name":"mlian031/pi","owner":"mlian031","description":"Pi is a discord bot for those interested in contest math to practice their skills while engaging in a casual conversation with their fellow mathematicians or friends.","archived":false,"fork":false,"pushed_at":"2021-11-16T21:30:38.000Z","size":199425,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T12:20:31.720Z","etag":null,"topics":["aops","contest-math","contests","discord","discord-bot","discord-py","docker","docker-compose","latex","math"],"latest_commit_sha":null,"homepage":"https://pi-bot.netlify.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlian031.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-17T23:09:26.000Z","updated_at":"2025-01-17T16:00:33.000Z","dependencies_parsed_at":"2022-09-03T19:00:34.141Z","dependency_job_id":null,"html_url":"https://github.com/mlian031/pi","commit_stats":null,"previous_names":["m1iang/pi","mlian031/pi","m1kql/pi"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlian031%2Fpi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlian031%2Fpi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlian031%2Fpi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlian031%2Fpi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlian031","download_url":"https://codeload.github.com/mlian031/pi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247989658,"owners_count":21029349,"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":["aops","contest-math","contests","discord","discord-bot","discord-py","docker","docker-compose","latex","math"],"created_at":"2025-02-15T00:48:05.098Z","updated_at":"2025-12-30T23:05:10.071Z","avatar_url":"https://github.com/mlian031.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./Pi.png\" alt=\"\" width=\"256\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n\u003c/div\u003e\n\n\u003cdiv\u003e\n\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/workflow/status/yak-fumblepack/pi/Build?logo=github\u0026logoColor=lightgrey\u0026style=plastic\"\u003e \n\u003cimg alt=\"GitHub release (latest by date)\" src=\"https://img.shields.io/github/v/release/yak-fumblepack/pi?style=plastic\"\u003e\n\u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/yak-fumblepack/pi?style=plastic\"\u003e\n\u003ca href=\"https://discord.com/api/oauth2/authorize?client_id=842500814625832990\u0026permissions=0\u0026scope=bot\"\u003e\u003cimg src=\"https://img.shields.io/badge/Invite-7289DA?style=plastic\u0026logo=discord\u0026logoColor=white\" alt=\"Invite the bot to your discord server\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Overview\n\nPi is a discord bot for those interested in contest math to practice their skills while engaging in a casual conversation with their fellow mathematicians or friends. \n\nSome features include: \n\n- Ability to fetch problems from USAMO, USAJMO, AIME, AMC 10 \u0026 12\n- Fully rendered problems (using LaTeX) with solution links\n- Robust points system to promote healthy competition\n- Extensible core module, simply make a pull request with your cog and we can add it in without a problem!\n\nNote: It would be preferred if you do not host your own instance of this bot\n\n### Table of contents\n- [Overview](#overview)\n  - [Table of contents](#table-of-contents)\n- [Getting Started](#getting-started)\n  - [Python venv](#python-venv)\n  - [Docker](#docker)\n  - [Setup](#setup)\n- [Commands](#commands)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Getting Started\n\n### Python venv\n\nMake a virtual environment\n\n```shell\n$ mkdir bot \u0026\u0026 cd bot\n$ python -m venv venv\n$ source venv/bin/activate\n```\n\nClone the repo\n\n```shell\n$ git clone https://github.com/yak-fumblepack/pi.git\n$ cd pi\n$ pip install -U -r requirements.txt\n```\n\nAdd your token to the environmental variable file (`.env`). Make sure you are in the project's root directory.\n\n```shell\n$ echo \"token=\u003cyour token without spaces and without the arrow brackets\u003e\" \u003e .env\n```\n\nChange directory and run the bot.\n\n```shell\n$ cd bot/src/\n$ python main.py\n```\n\n### Docker\n\nPrerequisites:\n- Docker\n- Docker Compose\n\nTo run the bot:\n\n```shell\n$ git clone https://github.com/yak-fumblepack/pi.git\n$ sudo docker-compose up --build\n```\n\nOr if you don't have docker compose, build the image and run it. For more info, refer to their respective readmes:\n- [The bot](https://github.com/yak-fumblepack/pi/tree/rewrite/bot)\n\n\n### Setup \n\nThis bot uses firebase as the database service. \n\nSet up the `.env` like so (if you would like to run it using firebase):\n\n```\ntoken=\u003cyour token\u003e\nbug_channel=\u003cchannel id\u003e\nfeature_channel=\u003cchannel id\u003e\nfirebase_type=\nfirebase_project_id=\nfirebase_private_key_id=\nfirebase_private_key=\nfirebase_client_email=\nfirebase_client_id=\nfirebase_auth_uri=\nfirebase_token_uri=\nfirebase_auth_provider_x509_cert_url=\nfirebase_client_x509_cert_url=\n```\n\nRememeber to omit the \u003c \u003e. There is no space as well.\n\n## Commands\n\nPrefix: `=`\n\n\u003cu\u003eBasic Commands\u003c/u\u003e\n\u003cbr\u003e\n| Command  | Has Arguments | Arguments             | Expected Output                                                                          |\n| -------- | ------------- | --------------------- | ---------------------------------------------------------------------------------------- |\n| `=hello` | No            |                       | `Hello, World!`                                                                          |\n| `=help`  | Yes           | `bot`, `math`, `misc` | An embed showing the arguments you can pass to it to learn more about the other commands |\n\n\u003cu\u003eBot\u003c/u\u003e\n\u003cbr\u003e\n| Command   | Has Arguments | Arguments | Expected Output                                                  |\n| --------- | ------------- | --------- | ---------------------------------------------------------------- |\n| `=invite` | No            |           | Gives invite links to the support server and for the bot         |\n| `=info`   | No            |           | Gives info about this bot and other other techinical information |\n\n\u003cu\u003eMath\u003c/u\u003e\n\u003cbr\u003e\n| Command        | Has Arguments | Arguments                                                 | Expected Output                                                                                               |\n| -------------- | ------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |\n| `=statistics`  | Yes           | `@user`, `user_id`                                        | Gives an embed showing your statistics (if you leave the arguments blank) or someone else's statistics        |\n| `=tex`         | Yes           | `tex statement`                                           | Returns a rendered LaTeX statement                                                                            |\n| `=amc10`       | Yes           | `easy`, `medium`, `hard`                                  | Gives an AMC10 problem of the selected difficulty                                                             |\n| `=amc12`       | Yes           | `easy`, `medium`, `hard`                                  | Gives an AMC12 problem of the selected difficulty                                                             |\n| `=cmo`         | No            |                                                           | Gives you a random CMO problem.                                                                               |\n| `=aime`        | No            |                                                           | Gives you a random AIME I or II problem.                                                                      |\n| `=fetch`       | Yes           | `contest_name year [contest id, optional] problem_number` | Fetches a problem from the specified path                                                                     |\n| `=last5`       | Yes           | `contest_name`                                            | Returns the last 5 questions from a specified contest                                                         |\n| `=random`      | No            |                                                           | Returns a random problem                                                                                      |\n| `=leaderboard` | Yes           | `amount of users`                                         | Shows the leaderboard for the server with a specified amount of users. If it is not given, the default is 10. |\n\n\u003cu\u003eMiscellaneous\u003c/u\u003e\n\u003cbr\u003e\n| Command    | Has Arguments | Arguments                          | Expected Output                                                                            |\n| ---------- | ------------- | ---------------------------------- | ------------------------------------------------------------------------------------------ |\n| `=suggest` | Yes           | `your message`                     | Allows you to make a feature suggestion or any suggestion. Needs you to complete a captcha |\n| `=report`  | Yes           | `your message`                     | Allows you to make a bug report or any report on an issue. Needs you to complete a captcha |\n| `=runcode` | Yes           | `language` `code` `file extension` | Runs code from different languages.                                                        |\n\n## Contributing\n\nFeatures, bugfixes, issues are all greatly appreciated. Please, if you do encounter a bug, report it to us by opening an issue or even better, fix it yourself and make a pull request! \n\nPlease open a pull request or an issue on the `dev` branch.\n\n## License\nThis project is licensed under the [GNU AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.txt) license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlian031%2Fpi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlian031%2Fpi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlian031%2Fpi/lists"}