Skip to content

cuducos/bot-na-lista

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bot na Lista

Bot na Lista bot (Portuguese word play for add to the list) made with 💜 by Cuducos and Flávia.

Send a message or add @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

$ cargo fmt
$ cargo clippy --fix
$ cargo test -- --test-threads 1