Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Test(MessageFilter):
- def filter(self, message):
- self.data_filter = True
- if message.text == "cool":
- dct = {"fuck": "duck"}
- return dct
- def cool(fn):
- def wrapper(context, update, dispatcher, check_result, *args, **kwargs):
- fn(*args, **kwargs)
- handler = MessageHandler(test, fn)
- dispatcher.add_handler(handler)
- return wrapper
- @cool
- def ok_kool_test(update, context):
- user_id = update.effective_chat.id
- print(context.fuck)
Add Comment
Please, Sign In to add comment