本文整理汇总了Python中config.Configuration.add_handler方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.add_handler方法的具体用法?Python Configuration.add_handler怎么用?Python Configuration.add_handler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类config.Configuration
的用法示例。
在下文中一共展示了Configuration.add_handler方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load_database
# 需要导入模块: from config import Configuration [as 别名]
# 或者: from config.Configuration import add_handler [as 别名]
search_engines = load_database(config.get("db", "searchengines"))
search = Search(search_engines)
#expression = Expression()
actions = Actions(storage)
choice = Choice(conf)
scripting = Scripting(storage, search_engines=search_engines)
fatfox = FatFox()
burgi = Burgi()
cookies = Cookies()
#urltitle = Urltitle()
#finder = Finder()
hands = Hands(storage, conf, config.get("modules", "hands"))
weather = Weather(storage, conf, config.get("modules", "hands"))
mute = Mute(storage)
conf.add_handler('mute', mute.config_handler)
conf.add_handler(['show', 'mute'], mute.show_handler)
conf.add_handler(['show', 'participants'], status.show_participants)
conf.add_handler(['show', 'online', 'users'], status.show_online_users)
xmpp = Client(jid, password, room, nick)
xmpp.register_plugin('xep_0030') # Service Discovery
xmpp.register_plugin('xep_0045') # Multi-User Chat
xmpp.register_plugin('xep_0199') # XMPP Ping
xmpp.add_mentation_listener(mute.talk_muted)
xmpp.add_mentation_listener(conf)
xmpp.add_mentation_listener(msgdb)
xmpp.add_mentation_listener(actions.active)
xmpp.add_message_listener(mute.talk_muted)
xmpp.add_message_listener(conf)
xmpp.add_message_listener(pingpong)