{"id":20641837,"url":"https://github.com/lunnosmp4/moulibot","last_synced_at":"2025-04-16T01:37:37.561Z","repository":{"id":57701705,"uuid":"499791082","full_name":"LunnosMp4/MouliBot","owner":"LunnosMp4","description":"A Discord bot for my.epitech.eu","archived":false,"fork":false,"pushed_at":"2023-01-11T14:19:28.000Z","size":1783,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T03:32:09.731Z","etag":null,"topics":["api","discord-bot","discord-js","epitech","moulinette"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LunnosMp4.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}},"created_at":"2022-06-04T10:16:51.000Z","updated_at":"2024-12-10T11:05:15.000Z","dependencies_parsed_at":"2023-02-09T03:16:29.695Z","dependency_job_id":null,"html_url":"https://github.com/LunnosMp4/MouliBot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunnosMp4%2FMouliBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunnosMp4%2FMouliBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunnosMp4%2FMouliBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunnosMp4%2FMouliBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LunnosMp4","download_url":"https://codeload.github.com/LunnosMp4/MouliBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249182786,"owners_count":21226123,"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":["api","discord-bot","discord-js","epitech","moulinette"],"created_at":"2024-11-16T16:06:51.278Z","updated_at":"2025-04-16T01:37:37.535Z","avatar_url":"https://github.com/LunnosMp4.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# MouliBot\n\n## A Discord Bot for [my.epitech.eu](https://my.epitech.eu/)\n\nThis discord bot aims to make life easier for epitech students !\u003cbr/\u003eThanks to this bot you will be able to directly access your latest notes directly from discord !\u003cbr/\u003e\n\n**This bot is not affiliated with Epitech in any way, it is a personal project that I have developed for my own use and decided to share.**\u003cbr\u003e\n\nThe bot will be active 24/7 the First January 2023.\n**[Add MouliBot to your server](https://discord.com/api/oauth2/authorize?client_id=1020042521105158284\u0026permissions=8\u0026scope=applications.commands%20bot)**\n\u003cbr\u003e\n \n## Overview\n \nYou can see below examples of the main commands that can be used on discord.\n**This bot use slash commands, just type / on discord to see the list of commands.**\n \n- `/login \u003cemail\u003e \u003cpassword\u003e` : Connect you to [my.epitech.eu](https://my.epitech.eu/) using your epitech mail and password. **Your Password and Email are not saved.**\n\n - `/last` : Shows the last test performed on [my.epitech.eu](https://my.epitech.eu/), you can also change the test by clicking on the arrows under the message.\n \n\u003ca href=\"https://zupimages.net/viewer.php?id=22/40/y4xv.png\"\u003e\u003cimg src=\"https://zupimages.net/up/22/40/y4xv.png\" alt=\"\" height=\"400\"/\u003e\u003c/a\u003e\n\n - `/total` : Shows the total of syntax errors of all your projects combined per units. You can also look at the syntax errors per units by doing the command `/total \u003cunit_name\u003e`\n \n\u003ca href=\"https://zupimages.net/viewer.php?id=22/40/px2q.png\"\u003e\u003cimg src=\"https://zupimages.net/up/22/40/px2q.png\" alt=\"\" height=\"400\"/\u003e\u003c/a\u003e\n\n\n## IMPORTANT\n\n**Please read the following lines.**\n\nWhen you will have done the command `/login` the bot will ask you to write a verification code. This is a code that you will receive by SMS on your phone. This code is to be written in the Discord chat. It comes the two steps authenticator of Microsoft **(I remind you that all your personal information (email and password) are in no way saved)**.\u003cbr\u003e\n\nYour token will be recovered thanks to this connection and updated regularly (every hour).\nIf you receive the following message (see photo below) is that your token and being updated **(it's completely normal)**, you just have to wait a few seconds that the message changes (see photo below) and you can try the command again !\n\n- When the token is updating:\u003cbr\u003e\n\u003ca href=\"https://zupimages.net/viewer.php?id=22/40/wubu.png\"\u003e\u003cimg src=\"https://zupimages.net/up/22/40/wubu.png\" alt=\"\" height=\"200\"/\u003e\u003c/a\u003e\n\n- Afer a few seconds:\u003cbr\u003e\n\u003ca href=\"https://zupimages.net/viewer.php?id=22/40/712t.png\"\u003e\u003cimg src=\"https://zupimages.net/up/22/40/712t.png\" alt=\"\" height=\"200\"/\u003e\u003c/a\u003e\n\n## Token\n\nThis bot works with a recoverable token on the site my.epitech.eu. Token recovery is done automatically, you just need to log in once with the command `/login`.\n\n\nIf you want to get your token manually follow the step below.\u003cbr/\u003e\nFirst you need to go and login to [my.epitech.eu](https://my.epitech.eu/) then right click, inspect, and go to the networks section.\u003cbr/\u003eOnce done you will probably have to do **ctrl + r** to refresh the requests. Once done at the top of the section, check Fetch/XHR and search for the \"2021\" query.\u003cbr/\u003eOnce inside you will find the Authentication variable which contains our token !\n## API\n\nFor this bot I use the api of **api.epitest.eu** but this one is not documented, here is what I can show you about it, hoping to help you !\n\nFirst you have to request on this link : https://api.epitest.eu/me/${CurrentYears}/your_token\u003cbr/\u003e\n*⚠️ Oddly the year in the ${Current Years} variable is one year back (example: 2022 =\u003e 2021) ⚠️*\n\nThen the response from the api looks like this :\n\n```json\n[{\n    {\n        \"project\": {\n            \"slug\": \"dante\",            → Short Project Name\n            \"name\": \"Dante's star\",     → Project Name\n            \"module\": {\n                \"code\": \"B-CPE-200\"     → Unit\n            },\n            \"skills\": []\n        },\n        \"results\": {\n            \"testRunId\": 4736784,\n            \"logins\": [\"name@epitech.eu\"],\n            \"prerequisites\": 2.0,\n            \"externalItems\": [{\n                \"type\": \"lint.note\",    → Project Note\n                \"value\": -3.0\n            }, {\n                \"type\": \"lint.major\",   → Major Error\n                \"value\": 0.0\n            }, {\n                \"type\": \"lint.minor\",   → Minor Error\n                \"value\": 3.0\n            }, {\n                \"type\": \"lint.info\",    → Info Error\n                \"value\": 3.0\n            }],\n            \"mandatoryFailed\": 0,\n            \"skills\": {\n                \"00 - Basics\": {\n                    \"count\": 2,          → Total Test of this part\n                    \"passed\": 2,         → Number of Test passed\n                    \"crashed\": 0,        → NUmber of Test crashed\n                    \"mandatoryFailed\": 0\n                },\n                ...\n                \"05 - Solving\": {\n                    \"count\": 6,\n                    \"passed\": 2,\n                    \"crashed\": 0,\n                    \"mandatoryFailed\": 0\n                }\n            }\n        },\n        \"date\": \"2022-05-19T08:07:02Z\"  → Test Date\n    },\n    ...\n}]\n    \n```\n\n**If you like this project don't hesitate to star it !**\n## Authors\n\n- [Lunnos](https://www.github.com/LunnosMp4)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunnosmp4%2Fmoulibot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flunnosmp4%2Fmoulibot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunnosmp4%2Fmoulibot/lists"}