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

TelegramDeprecationWarning: Old Handler API is deprecated #19

Open
daquinoaldo opened this issue Apr 26, 2019 · 1 comment
Open

TelegramDeprecationWarning: Old Handler API is deprecated #19

daquinoaldo opened this issue Apr 26, 2019 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@daquinoaldo
Copy link
Member

Warning in gdgpisausermanager.py. See https://git.io/fxJuV for details.

Adding use_context=True as suggested seems broking the bot (at least on Docker).

@daquinoaldo daquinoaldo added help wanted Extra attention is needed bug Something isn't working labels Apr 26, 2019
@schrer
Copy link

schrer commented Sep 4, 2020

Hi @daquinoaldo
I happened to come across this ticket/repo via google when solving the same issue for a repo of mine.

You will not only have to add use_context=True but also change your message-handler functions to accept and use the context object. The reason your bot is breaking is likely because once use_context is set, the message handlers will get update and the context-object passed in, no more bot-object, so you will have to adjust their header and adjust usages of bot, probably by getting the bot-object from the context, instead of the method header.
More detailed descriptions are in the link that you already posted in your initial comment.

I hope this might help anyone who picks up this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants