From b0fcdb781c4129ef28c8fe538842fbdcd4810f4f Mon Sep 17 00:00:00 2001 From: Pavel Kirilin <win10@list.ru> Date: Sun, 28 Jun 2020 05:50:13 +0400 Subject: [PATCH] Fixed .env problem. Fixed readme. Signed-off-by: Pavel Kirilin <win10@list.ru> --- .env => .env.example | 0 README.md | 3 ++- src/actions/replies.py | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) rename .env => .env.example (100%) diff --git a/.env b/.env.example similarity index 100% rename from .env rename to .env.example diff --git a/README.md b/README.md index 49d315f..ce7ef57 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ You can run it locally or setup a deployment on your server. ### Local configuration To run this locally just clone the repo, -go to the cloned folder and run: +go to the cloned folder, rename .env.example to .env, fill it and then just run: ```shell pip install -r requirements/requirements.base.txt export $(cat .env) @@ -55,3 +55,4 @@ pip install -r requirements/requirements.dev.txt pre-commit install ``` Then you can do changes. +For testing you can use `make test`. diff --git a/src/actions/replies.py b/src/actions/replies.py index e1f83c3..3fff6b0 100644 --- a/src/actions/replies.py +++ b/src/actions/replies.py @@ -11,7 +11,11 @@ logger = logging.getLogger(__name__) @config.telegram_client.on(events.ChatAction()) async def welcome(event: events.ChatAction.Event): if event.user_joined or event.user_added: - await event.respond(random.choice(["Привет!", "Добро пожаловать!"])) + await event.respond( + random.choice( + ["Привет!", "Добро пожаловать!", "ЗдравÑтвуй!", "Добрый день!"] + ) + ) if event.user_left or event.user_kicked: await event.respond( random.choice(["До Ñкорых вÑтреч!", "Прощайте!", "До ÑвиданиÑ!", "Пока!"]) -- GitLab