mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Added elapsed command.
This commit is contained in:
parent
16c4561da6
commit
5526c4e298
@ -46,7 +46,7 @@ import dateutil.parser
|
||||
|
||||
import supybot.conf as conf
|
||||
import supybot.utils as utils
|
||||
from supybot.commands import wrap
|
||||
from supybot.commands import *
|
||||
import supybot.privmsgs as privmsgs
|
||||
import supybot.registry as registry
|
||||
import supybot.callbacks as callbacks
|
||||
@ -178,6 +178,15 @@ class Time(callbacks.Privmsg):
|
||||
irc.reply(time.strftime(format, time.localtime(seconds)))
|
||||
time = wrap(time, ['channel?', 'nonInt?', ('?int', TIME.time)])
|
||||
|
||||
def elapsed(self, irc, msg, args, seconds):
|
||||
"""<seconds>
|
||||
|
||||
Returns a pretty string that is the amount of time represented by
|
||||
<seconds>.
|
||||
"""
|
||||
irc.reply(utils.timeElapsed(seconds))
|
||||
elapsed = wrap(elapsed, ['int'])
|
||||
|
||||
|
||||
Class = Time
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user