Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiwiyou/rs-lib-bot
Telegram bot for searching rust crates
https://github.com/kiwiyou/rs-lib-bot
rust telegram-bot
Last synced: 26 days ago
JSON representation
Telegram bot for searching rust crates
- Host: GitHub
- URL: https://github.com/kiwiyou/rs-lib-bot
- Owner: kiwiyou
- License: other
- Created: 2020-09-29T19:53:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-13T03:55:12.000Z (about 4 years ago)
- Last Synced: 2024-10-27T12:57:41.565Z (2 months ago)
- Topics: rust, telegram-bot
- Language: Rust
- Homepage:
- Size: 89.8 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
## About
`rs-lib-bot` is a telegram bot built to search or share information of a Rust crate easily.
Though on a very early stage of development, you can talk to [`@rslibbot`](https://t.me/rslibbot) if you want to try it.
## Features
- [x] Search crates with inline queries and view its information page
- [ ] Browse docs.rs with inline buttons## Deploying on your own
You can build `rs-lib-bot` and run as your own bot.
Before starting, you need several things:
- Telegram bot token, which you can get by talking to [@BotFather](https://t.me/BotFather)
- Public server to run https webhook service for the bot.
- You can use [ngrok](https://ngrok.com/) in case you are just testing/debugging/etc.
- Running instance of [crate-search-cache](https://github.com/kiwiyou/crate-search-cache)
- Client key for your Sentry project. (optional)Once you are ready, clone the repository.
```bash
git clone https://github.com/kiwiyou/rs-lib-bot.git
cd rs-lib-bot
```Then, set environment variables as follows:
```bash
export BOT_TOKEN="123456789:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
export PORT="8080" # port to bind server on
export WEBHOOK_URL="https://your.public.server" # IMPORTANT: without trailing slash
export SEARCH_URL="https://your.cache.server" # IMPORTANT: without trailing slash
export SENTRY_DSN="https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.ingest.sentry.io/1234567" # optional
```Now you can run the bot with `cargo run`.
```bash
RUST_LOG=info cargo run --release
RUST_LOG=info cargo run --release --no-default-features # If you don't use Sentry
```## Something got wrong with the bot!
Please contact me on Telegram [@kiwiyou](https://t.me/kiwiyou) or send an email to [[email protected]](mailto:[email protected]).