https://github.com/cuducos/bot-na-lista
π Bot na Lista: a simple shopping list app for Telegram
https://github.com/cuducos/bot-na-lista
lista-de-compras shopping-list telegram-bot to-do-list
Last synced: about 1 month ago
JSON representation
π Bot na Lista: a simple shopping list app for Telegram
- Host: GitHub
- URL: https://github.com/cuducos/bot-na-lista
- Owner: cuducos
- License: gpl-3.0
- Created: 2022-01-14T02:48:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-23T13:47:43.000Z (10 months ago)
- Last Synced: 2024-12-29T20:33:27.589Z (9 months ago)
- Topics: lista-de-compras, shopping-list, telegram-bot, to-do-list
- Language: Rust
- Homepage: https://t.me/bot_na_lista_bot
- Size: 128 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Bot na Lista
Bot na Lista bot (Portuguese word play for _add to the list_) made with π by [Cuducos](https://github.com/cuducos) and [FlΓ‘via](https://github.com/Flaviasv).
Send a message or add [`@bot_na_lista_bot`](https://t.me/bot_na_lista_bot) to a group to get started.
| Command | Description |
|---|---|
| `text` | Adds `text` to the list |
| `number` | Removes item `number` from the list |
| `/view` | Shows the list |> [!WARNING]
> Lists with no activity for more than one year will be deleted.## Environment Variables
| Variable | Description |
|---|---|
| `DATABASE_URL` | Credentials for a PostgreSQL database |
| `TELOXIDE_TOKEN` | Telegram bot token |
| `PORT` | Bot webhook port (optional) |
| `HOST` | Bot webhook host (optional) |If the environment variables `PORT` and `HOST` are set, the bot starts as a webhook. Otherwise, it starts as a polling bot.
### Database
If you need a quick database **for development**, `./contrib/db.sh` starts a Docker container with one at `
postgres://bot:lista@0.0.0.0:5432/bot_na_lista?sslmode=disable`.If you need one **for tests**, `./contrib/db.sh --test` starts a Docker container with no data persistence at the same URI.
To stop the database use `docker stop bot-na-lista-db`.
## Contributing
```console
$ cargo fmt
$ cargo clippy --fix
$ cargo test -- --test-threads 1
```