def register(self, match, func, flags=0, mention=False, admin=False,
channel_id='*'):
logger.debug('Registering message: %s, %s from %s',
match,
func.__name__,
inspect.getabsfile(func))
if not asyncio.iscoroutinefunction(func):
func = asyncio.coroutine(func)
option = {
'func': func,
'mention': mention,
'admin': admin,
'channel_id': channel_id
}
self._endpoints[re.compile(match, flags)].append(option)
评论列表
文章目录