A bot for selling or auctioning used items on Telegram.
pip install maleto
Maleto uses poetry
for package management. Learn how to install poetry here.
git clone https://github.com/ha-D/maleto
cd maleto
poetry install
poetry run maleto
A Telegram API token is needed in order to run maleto. You can easily obtain one by opening BotFather in your Telegram client, entering /newbot
and just following the steps. Learn more about Telegram Bots here.
Maleto persists its data in a MongoDB. You will need to provide a URI to a MongoDB database when running maleto.
You can also choose to run with an in-memory MongoDB instance and Maleto will download and spin-up an in-memory MongoDB instance using pymongo_inmemory. Note however, if you use this mode all your data will be lost once the process exits.
Use the following command to run maleto in poll mode using your API token.
maleto start -t [API_TOKEN] -m poll
If you don't have a MongoDB instance running on your local machine you will need to specify a MongoDB URI as well.
maleto start -t [API_TOKEN] -m poll -d mongodb://1.2.3.4/maleto
Or use mem
instead to use an in-memory database
maleto start -t [API_TOKEN] -m poll -d mem
Like most Telegram Bots, maleto can be configured to receive updates using either polling or webhooks. Polling is slower but useful for testing since it doesn't require a valid domain name or HTTPS server.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.