Yes, you can use these call back functions in the class as well. All you have to do is use self.methodName and in class it should have def methodName(self, update, context)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Can I use python-telegram-bot inside a class?
I would like to create a TgBot class and create the bot inside this class
Yes, you can use these call back functions in the class as well. All you have to do is use
self.methodName
and in class it should havedef methodName(self, update, context)