telegram.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:pycustos 作者: fact-project 项目源码 文件源码
def __init__(self, token, **kwargs):
        '''
        Create a new TelegramNotifier

        :param token: Your Bot's authentication token
        :param recipients: The chatIDs or usernames that should
                           be contacted by this Notifier

        :type recipients: Iterable of recipients or dict mapping categories to recipients
        :param categories: The message categories this Notifier should relay
        :type categories: Iterable
        :param level: The minimum level for messages to be relayed
        :type level: int
        '''
        if _has_telepot is False:
            raise ImportError('The telepot package is required for this Notifier')
        self.bot = telepot.Bot(token)
        super().__init__(**kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号