ohld / django-telegram-bot

My sexy Django + python-telegram-bot + Celery + Redis + Postgres + Dokku + GitHub Actions template
https://t.me/ffmemesbot
Apache License 2.0
691 stars 170 forks source link

TypeError with arbitrary callback_data #35

Closed hsh01 closed 3 years ago

hsh01 commented 3 years ago

Hi, trying to use example with arbitrary callback_data, but it gives error TypeError: expected string or bytes-like object. I just copied all functions to tgbot/handlers.py and set all handlers from main() in tgbot/dispatcher.py. Any solution?

shamaevnn commented 3 years ago

@hsh01 It's crucial to provide proper callback_data while working with that type of handlers. It's difficult to say what is your problem without any example of your code.

By the way, we updated our template. Now it has a little bit differ structure which is much more convenient for using. Try it out, probably, it will solve your problem 😊