Source code for bot.plugs.hour

# botje/plugs/hour.py
#
#

""" hour plugin. """ 

## IMPORTS

from bot import kernel

## hour command

[docs]def do_hour(event): objs = [] for o in event.objects(): if not o.added: continue if event.rest not in o.timed.split()[1]: continue objs.append(o) for obj in sorted(objs, key=lambda x: x.timed): event.reply(obj.make_json())
kernel.register("hour", do_hour)