{"id":13466222,"url":"https://github.com/iyear/E5SubBot","last_synced_at":"2025-03-25T21:31:45.213Z","repository":{"id":37344397,"uuid":"249988014","full_name":"iyear/E5SubBot","owner":"iyear","description":"🤖 Telebot for E5 Renewal","archived":false,"fork":false,"pushed_at":"2023-12-18T23:02:58.000Z","size":463,"stargazers_count":1005,"open_issues_count":10,"forks_count":303,"subscribers_count":19,"default_branch":"dev","last_synced_at":"2024-10-29T17:54:54.985Z","etag":null,"topics":["e5-renewal","golang","office365","telebot","telegram-bot"],"latest_commit_sha":null,"homepage":"https://t.me/E5Sub_bot","language":"Go","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/iyear.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-25T13:37:39.000Z","updated_at":"2024-10-25T20:30:02.000Z","dependencies_parsed_at":"2022-07-08T03:02:20.330Z","dependency_job_id":"609f02b2-7f31-4352-b444-808fe4a27e4e","html_url":"https://github.com/iyear/E5SubBot","commit_stats":{"total_commits":174,"total_committers":6,"mean_commits":29.0,"dds":"0.11494252873563215","last_synced_commit":"19fa56309140ce94f67bf46576159cfbe70d47af"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyear%2FE5SubBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyear%2FE5SubBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyear%2FE5SubBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyear%2FE5SubBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iyear","download_url":"https://codeload.github.com/iyear/E5SubBot/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222091991,"owners_count":16929761,"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":["e5-renewal","golang","office365","telebot","telegram-bot"],"created_at":"2024-07-31T15:00:41.174Z","updated_at":"2024-10-29T18:31:25.961Z","avatar_url":"https://github.com/iyear.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/iyear/E5SubBot/raw/master/pics/office.png\" alt=\"logo\" width=\"130\" height=\"130\" align=\"left\" /\u003e\n\n\u003ch1\u003eE5SubBot\u003c/h1\u003e\n\n\u003e A Simple Telebot for E5 Renewal\n\n\u003cbr/\u003e\n\n![](https://img.shields.io/github/go-mod/go-version/iyear/E5SubBot?style=flat-square)\n![](https://img.shields.io/badge/license-GPL-lightgrey.svg?style=flat-square)\n![](https://img.shields.io/github/v/release/iyear/E5SubBot?color=red\u0026style=flat-square)\n![](https://img.shields.io/github/last-commit/iyear/E5SubBot?style=flat-square)\n![](https://img.shields.io/github/downloads/iyear/E5SubBot/total?style=flat-square)\n\n![](https://img.shields.io/github/workflow/status/iyear/E5SubBot/Docker%20Build?label=docker%20build\u0026style=flat-square)\n![](https://img.shields.io/docker/v/iyear/e5subbot?label=docker%20tag\u0026style=flat-square)\n![](https://img.shields.io/docker/image-size/iyear/e5subbot?style=flat-square\u0026label=docker%20image%20size)\n\nEnglish | [简体中文](https://github.com/iyear/E5SubBot/blob/master/README_zhCN.md) | [Telegram Chat](https://t.me/e5subbot)\n\nDEMO: https://t.me/E5Sub_bot\n\n## Feature\n\n- Automatically Renew E5 Subscription(Customizable Frequency)\n- Manageable Simple Account System\n- Available Task Execution Feedback\n- Convenient Authorization\n- Use concurrency to speed up\n\n## Principle\n\nE5 subscription is a subscription for developers, as long as the related API is called, it may be renewed\n\nCalling [Outlook ReadMail API](https://docs.microsoft.com/en-us/graph/api/user-list-messages?view=graph-rest-1.0\u0026tabs=http)\nto renew, does not guarantee the renewal effect.\n\n## Usage\n\n1. Type `/bind` in the robot dialog\n2. Click the link sent by the robot and register the Microsoft application, log in with the E5 master account or the\n   same domain account, and obtain `client_secret`. **Click to go back to Quick Start**, get `client_id`\n3. Copy `client_secret` and `client_id` and reply to bot in the format of `client_id(space)client_secret`\n   (Pay attention to spaces)\n4. Click on the authorization link sent by the robot and log in with the `E5` master account or the same domain account\n5. After authorization, it will jump to `http://localhost/e5sub……` (will prompt webpage error, just copy the link)\n6. Copy the link, and reply `link(space)alias (used to manage accounts)` in the robot dialog For\n   example: `http://localhost/e5sub/?code=abcd MyE5`, wait for the robot to bind and then complete\n\n## Deploy Your Own Bot\n\nBot creation\ntutorial : [Microsoft](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-connect-telegram?view=azure-bot-service-4.0)\n\n### Docker(Recommended)\n\n`Docker` Deployment used `sqlite` as database\n\nSupport `amd64` `386` `arm64` `arm/v6` `arm/v7` arch\n\n```shell\n#launch,you can set the time zone you want\ndocker run --name e5sub -e TZ=\"Asia/Shanghai\" --restart=always -d iyear/e5subbot:latest\n\n#view logs\ndocker logs -f e5sub\n\n#set config\ndocker cp PATH/TO/config.yml e5sub:/config.yml\ndocker restart e5sub\n\n#import db\ndocker cp PATH/TO/DATA.db e5sub:/data.db\ndocker restart e5sub\n\n#backup db\ndocker cp e5sub:/data.db .\n\n#backup config\ndocker cp e5sub:/config.yml .\n```\n\n### Binary Deployment\n\nDownload the binary files of the corresponding system on the [Releases](https://github.com/iyear/E5SubBot/releases) page\nand upload it to the server\n\nWindows: Start `E5SubBot.exe`\n\nLinux:\n\n```bash\nscreen -S e5sub\nchmod +x E5SubBot\n./E5SubBot\n(Ctrl A+D)\n```\n\n### Compile\n\nDownload the source code and install the GO environment\n\n```shell\ngit clone https://github.com/iyear/E5SubBot.git \u0026\u0026 cd E5SubBot \u0026\u0026 go build\n```\n\n## Configuration\n\nCreate `config.yml` in the same directory, encoded as `UTF-8`\n\nConfiguration Template:\n\n```yaml\nbot_token: YOUR_BOT_TOKEN\n# socks5: 127.0.0.1:1080\nbindmax: 999\ngoroutine: 20\nadmin: 111,222,333\nerrlimit: 999\nnotice: |-\n   aaa\n   bbb\n   ccc\ncron: \"1 */1 * * *\"\ndb: sqlite\ntable: users\n# mysql:\n#    host: 127.0.0.1\n#    port: 3306\n#    user: root\n#    password: pwd\n#    database: e5sub\n# ssl_mode is only required when the database requires a SSL connection (e.g. TiDB Cloud)\n#    ssl_mode: PREFERRED\nsqlite:\n   db: data.db\n```\n\n`bindmax`, `notice`, `admin`,`goroutine`, `errlimit` can be hot updated, just update `config.yml` to save.\n\n|  Configuration   | Explanation|Default|\n|  ----  | ----  |----|\n| bot_token  | Change to your own `BotToken` |-|\n| socks5  | `Socks5` proxy,if you do not need ,you should delete it. For example: `127.0.0.1:1080` |-|\n|notice|Announcement. Merged into `/help`|-|\n|admin|The administrator's `tgid`, go to https://t.me/userinfobot to get it, separated by `,`; Administrator permissions: manually call the task, get the total feedback of the task|-|\n|goroutine|Concurrent number, don’t be too big|10|\n|errlimit|The maximum number of errors for a single account, automatically unbind the single account and send a notification when it is full, without limiting the number of errors, change the value to a negative number `(-1)`; all errors will be cleared after the bot restarts|5|\n|cron|API call frequency, using `cron` expression|-|\n|bindmax|Maximum number of bindable|5|\n|db|`mysql` or `sqlite` , Indicates the database type used and sets the corresponding configuration|-|\n|table|Table name (set table to `users` when upgrading the old version; otherwise, the data table cannot be read)|-|\n|mysql|To configure `mysql`, create a database in advance|-|\n|sqlite|`sqlite` configuration|-|\n\n### Command\n\n```\n/my View bound account information\n/bind Bind new account\n/unbind Unbind account\n/export Export account information (JSON format)\n/help help\n/task Manually execute a task (Bot Administrator)\n/log Get the most recent log file (Bot Administrator)\n```\n\n## Others\n\n\u003e Feedback time is not as expected\n\nChange the server time zone, use `/task` to manually perform a task to refresh time.\n\n\u003e ERROR:Can't create more than max_prepared_stmt_count statements (current value: 16382).\n\nFailure to close `db` leads to triggering `mysql` concurrency limit, please update to `v0.1.9`.\n\n\u003e Long running crash\n\nSuspected memory leak. Not yet resolved, please run the daemon or restart Bot regularly.\n\n\u003e Unable to create application via bot\n\nhttps://t.me/e5subbot/5201\n\n## Contributing\n\n- Provide documentation in other languages\n- Provide help for code operation\n- Suggests user interaction\n- ……\n\n## More Functions\n\nIf you still want to support new features, please initiate an issue.\n\n## License\n\nGPLv3 \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyear%2FE5SubBot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiyear%2FE5SubBot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyear%2FE5SubBot/lists"}