tg-sync

git clone git://archive.git.mtrnord.blog/Nordgedanken/tg-sync.git
Log | Files | Refs | README

Hcommand.py (294B)


      1 from functools import wraps
      2 import traceback
      3 
      4 from bot.helper import sc, updater
      5 import telegram.ext
      6 from telegram.ext import Filters
      7 
      8 def register_command(filter):
      9     def wrap(f):
     10         #r = f()
     11         updater.dispatcher.add_handler(telegram.ext.CommandHandler(filter, f))
     12     return wrap