kopyl

Untitled

Apr 8th, 2021
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. class Test(MessageFilter):
  2.  
  3.     def filter(self, message):
  4.         self.data_filter = True
  5.         if message.text == "cool":
  6.             dct = {"fuck": "duck"}
  7.             return dct
  8.  
  9.  
  10.  
  11. def cool(fn):
  12.     def wrapper(context, update, dispatcher, check_result, *args, **kwargs):
  13.         fn(*args, **kwargs)
  14.     handler = MessageHandler(test, fn)
  15.     dispatcher.add_handler(handler)
  16.     return wrapper
  17.  
  18.  
  19. @cool
  20. def ok_kool_test(update, context):
  21.     user_id = update.effective_chat.id
  22.     print(context.fuck)
Add Comment
Please, Sign In to add comment