Compare commits
1 Commits
36d0f4b2f7
...
30289fd927
Author | SHA1 | Date | |
---|---|---|---|
30289fd927 |
10
plugin.py
10
plugin.py
@ -257,7 +257,7 @@ class Tripsit(callbacks.Plugin):
|
|||||||
re += utils.str.format(". You should have/will start feeling effects %s from/after dosing", onset)
|
re += utils.str.format(". You should have/will start feeling effects %s from/after dosing", onset)
|
||||||
irc.reply(re)
|
irc.reply(re)
|
||||||
|
|
||||||
@wrap([optional('postiveInt')])
|
@wrap([optional('positiveInt')])
|
||||||
def undose(self, irc, msg, args, entry):
|
def undose(self, irc, msg, args, entry):
|
||||||
"""<n>
|
"""<n>
|
||||||
|
|
||||||
@ -281,8 +281,7 @@ class Tripsit(callbacks.Plugin):
|
|||||||
else:
|
else:
|
||||||
irc.error(f'No doses saved for {nick}')
|
irc.error(f'No doses saved for {nick}')
|
||||||
|
|
||||||
@wrap()
|
def doseslogged(self, irc, msg, args):
|
||||||
def doseslogged(self, irc, msg, args, history):
|
|
||||||
"""
|
"""
|
||||||
This command takes no arguments.
|
This command takes no arguments.
|
||||||
|
|
||||||
@ -300,6 +299,7 @@ class Tripsit(callbacks.Plugin):
|
|||||||
else:
|
else:
|
||||||
irc.error(f"No doses saved for {nick}")
|
irc.error(f"No doses saved for {nick}")
|
||||||
|
|
||||||
|
doseslogged = wrap(doseslogged)
|
||||||
|
|
||||||
@wrap([optional('positiveInt')])
|
@wrap([optional('positiveInt')])
|
||||||
def lastdose(self, irc, msg, args, history):
|
def lastdose(self, irc, msg, args, history):
|
||||||
@ -328,9 +328,9 @@ class Tripsit(callbacks.Plugin):
|
|||||||
since_dose_seconds = since_dose.total_seconds()
|
since_dose_seconds = since_dose.total_seconds()
|
||||||
if history:
|
if history:
|
||||||
history = num2words(history, to='ordinal')
|
history = num2words(history, to='ordinal')
|
||||||
re = utils.str.format("Your %i last dose was %s of %s via %s at %s %s, %T ago", history, dose, drug, method, str(dose_time), timezone, since_dose_seconds)
|
re = utils.str.format("Your %i last dose was %s of %s via %s at %s %s, %T ago", history, dose, drug, method, dose_time.strftime("%c"), timezone, since_dose_seconds)
|
||||||
else:
|
else:
|
||||||
re = utils.str.format("You last dosed %s of %s via %s at %s %s, %T ago", dose, drug, method, str(dose_time), timezone, since_dose_seconds)
|
re = utils.str.format("You last dosed %s of %s via %s at %s %s, %T ago", dose, drug, method, dose_time.strftime("%c"), timezone, since_dose_seconds)
|
||||||
irc.reply(re)
|
irc.reply(re)
|
||||||
else:
|
else:
|
||||||
irc.error(f'No doses saved for {nick}')
|
irc.error(f'No doses saved for {nick}')
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
docopt==0.6.2
|
docopt==0.6.2
|
||||||
num2words==0.5.10
|
num2words==0.5.10
|
||||||
pytz==2020.5
|
pytz==2020.5
|
||||||
|
humanize==3.10.0
|
||||||
|
Loading…
Reference in New Issue
Block a user