Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include python_telegram_bot_django_persistence for persistence engine #10

Merged
merged 1 commit into from Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion {{cookiecutter.project_slug}}/requirements/base.txt
Expand Up @@ -2,4 +2,5 @@ Django~=3.2.4
psycopg2-binary>=2.8,<2.9
requests~=2.25.1
python-dotenv~=0.18.0
python-telegram-bot~=13.7
python-telegram-bot~=13.7
python-telegram-bot-django-persistence~=0.1.7
Expand Up @@ -13,6 +13,7 @@
ConversationHandler,
Filters,
)
from python_telegram_bot_django_persistence.persistence import DjangoPersistence
from django.conf import settings

from . import commands, callbacks, conversation, constants, messages, models
Expand Down Expand Up @@ -62,7 +63,7 @@ def __init__(self):

token = settings.TELEGRAM_TOKEN

self.updater = Updater(token=token, use_context=True, workers=200)
self.updater = Updater(token=token, use_context=True, workers=200, persistence=DjangoPersistence())
self.bot = telegram.Bot(token=token)

# Notify admins
Expand Down