{"id":15665936,"url":"https://github.com/upsuper/telegram-rustevalbot","last_synced_at":"2025-05-07T03:30:34.789Z","repository":{"id":51684008,"uuid":"144378874","full_name":"upsuper/telegram-rustevalbot","owner":"upsuper","description":"Telegram bot for Rust group","archived":true,"fork":false,"pushed_at":"2024-10-05T12:47:46.000Z","size":622,"stargazers_count":55,"open_issues_count":15,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T11:13:59.967Z","etag":null,"topics":["rust","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/upsuper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["upsuper"]}},"created_at":"2018-08-11T11:12:09.000Z","updated_at":"2025-01-08T07:48:36.000Z","dependencies_parsed_at":"2023-02-12T15:16:34.324Z","dependency_job_id":"c09a5233-f7ad-420d-9889-66a84108b365","html_url":"https://github.com/upsuper/telegram-rustevalbot","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upsuper%2Ftelegram-rustevalbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upsuper%2Ftelegram-rustevalbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upsuper%2Ftelegram-rustevalbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upsuper%2Ftelegram-rustevalbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/upsuper","download_url":"https://codeload.github.com/upsuper/telegram-rustevalbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252806324,"owners_count":21807188,"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":["rust","telegram-bot"],"created_at":"2024-10-03T13:57:45.559Z","updated_at":"2025-05-07T03:30:34.537Z","avatar_url":"https://github.com/upsuper.png","language":"Rust","funding_links":["https://github.com/sponsors/upsuper"],"categories":[],"sub_categories":[],"readme":"# Telegram Rust eval bot\n\n[![Build Status](https://github.com/upsuper/telegram-rustevalbot/actions/workflows/check.yml/badge.svg)](https://github.com/upsuper/telegram-rustevalbot/actions/workflows/check.yml)\n\nThis bot program handles Eval bot and Crates.io bot.\n\n## Eval bot\n\nThis is a Telegram bot for simple query of Rust-related stuff,\ninspired by [Playbot NG](https://github.com/panicbit/playbot_ng) on IRC.\n\nThe official instance of this bot is [@rustevalbot](https://t.me/rustevalbot).\n\n### Usage\n\nInteraction with eval bot is done either\nvia commands on Telegram channel that it joins,\nor by talking directly to it.\n\nAll command which recognized by it can be edited.\nThe reply of such command would be updated automatically as well.\nIf the edited command is no longer recognized,\nthe reply from the bot will be removed.\n(But removing the original command wouldn't remove the reply,\nbecause Telegram doesn't send update for such event.)\n\n#### Code evaluation\n\nEval bot evaluates Rust code for command `/eval`,\ne.g.  `/eval Vec::\u003cusize\u003e::new().as_ptr()`.\nThis is backed by [Rust Playground](https://play.rust-lang.org/).\n\nBy default, the code is wrapped in a template that prints\nthe result of the expression via its `Debug` impl.\nThis behavior can be changed via `--bare` flag.\n\nThere are a few flags that can modify the behavior of the evaluation.\nYou can select the channel using\n`--stable` (default), `--beta`, or `--nightly`.\nYou can pick the build profile using `--debug` (default) or `--release`.\nTo make the bot evaluate code as is, use `--bare`.\n\nFor convenience, inner attributes and `extern crate`s\nat the beginning of code are moved to the beginning of the wrapped code\nwhen `--bare` is not used.\n\n#### Other commands\n\nYou can use `/help` command when talking to it directly to query other\ncommands available.\n\nAll command also support `--help` flag to display help information.\n\n## Crates.io bot\n\nThis is a Telegram bot running under inline mode\nfor helping people find and send details of crates on crates.io.\n\nThe official instance of this bot is [@cratesiobot](https://t.me/cratesiobot).\n\nIt can be used everywhere with a message in format `@cratesiobot \u003ccrate\u003e`.\nTelegram would should a menu for user to select crate from.\n\n## Rust doc bot\n\nThis is a Telegram bot running under inline mode\nfor helping people find and send details of items in Rust official document.\n\nThe official instance of this bot is [@rustdocbot](https://t.me/rustdocbot).\n\nIt can be used everywhere with a message in format `@rustdocbot \u003ccrate\u003e`.\nTelegram would should a menu for user to select item from.\n\nThis replaces the `/doc` command previously available in the Eval bot.\n\n## Configuration\n\nThis bot program uses environment variable for config,\nand also recognize `.env` file in the working directory.\n\nBot tokens can be specified via:\n* `EVAL_TELEGRAM_TOKEN`: the Eval bot\n* `CRATESIO_TELEGRAM_TOKEN`: the Crates.io bot\n* `RUSTDOC_TELEGRAM_TOKEN`: the Rust doc bot\n\nAt least one of the tokens must be provided.\nThe bot tokens can be created with [@BotFather](https://t.me/BotFather).\n\nIt also requires `BOT_ADMIN_ID` to be specified as the User ID of admin account.\nThe bot program will send message to the account when it starts and stops\nvia the first configured bot in the order of the list above.\n\nIf the Eval bot is enabled,\nadmin would be able to use `/shutdown` command on that bot to stop the program.\n\nFor the User ID, one can get their own User ID\nvia [@userinfobot](https://t.me/userinfobot)\nor [@JsonDumpBot](https://t.me/JsonDumpBot).\n\nIf the Rust doc bot is enabled,\na `search-index.js` file from Rust doc must be present.\n\nThe Eval bot requires write permission to `record_list.json`\nin the current directory in order to persist command information\nacross reboot for command editing.\n\n### Upgrade\n\nThis bot listens on `upgrade` file in the current directory,\nand when the file gets written,\nthe bot will quit itself as if a `/shutdown` command is sent.\n\nYou need to have this file available,\notherwise bot would refuse to run.\n\n## License\n\nCopyright (C) 2018-2020 Xidorn Quan\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupsuper%2Ftelegram-rustevalbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fupsuper%2Ftelegram-rustevalbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupsuper%2Ftelegram-rustevalbot/lists"}