Answer the question
In order to leave comments, you need to log in
How to use library decorators inside a class?
I need to use a decorator inside a class. I tried to do it via self.bot, however it was not successful:
import telebot
class Bot:
def __init__(self, token):
self.bot = telebot.TeleBot(token)
@self.bot.message_handler(content_types=['text'])
def start(message):
pass
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question