Compare commits
1 Commits
36d0f4b2f7
...
30289fd927
Author | SHA1 | Date | |
---|---|---|---|
30289fd927 |
13
plugin.py
13
plugin.py
@ -154,8 +154,7 @@ class Tripsit(callbacks.Plugin):
|
||||
irc.reply("Unknown combo (that doesn't mean it's safe). Known combos: lsd, mushrooms, dmt, mescaline, dox, nbomes, 2c-x, 2c-t-x, amt, 5-meo-xxt, cannabis, ketamine, mxe, dxm, pcp, nitrous, amphetamines, mdma, cocaine, caffeine, alcohol, ghb/gbl, opioids, tramadol, benzodiazepines, maois, ssris.")
|
||||
|
||||
combo = wrap(combo, [("something"), ("something")])
|
||||
|
||||
# TitleCase for lowercase inputs
|
||||
|
||||
def set(self, irc, msg, args, timezone):
|
||||
"""<timezone>
|
||||
|
||||
@ -258,7 +257,7 @@ class Tripsit(callbacks.Plugin):
|
||||
re += utils.str.format(". You should have/will start feeling effects %s from/after dosing", onset)
|
||||
irc.reply(re)
|
||||
|
||||
@wrap([optional('postiveInt')])
|
||||
@wrap([optional('positiveInt')])
|
||||
def undose(self, irc, msg, args, entry):
|
||||
"""<n>
|
||||
|
||||
@ -282,8 +281,7 @@ class Tripsit(callbacks.Plugin):
|
||||
else:
|
||||
irc.error(f'No doses saved for {nick}')
|
||||
|
||||
@wrap()
|
||||
def doseslogged(self, irc, msg, args, history):
|
||||
def doseslogged(self, irc, msg, args):
|
||||
"""
|
||||
This command takes no arguments.
|
||||
|
||||
@ -301,6 +299,7 @@ class Tripsit(callbacks.Plugin):
|
||||
else:
|
||||
irc.error(f"No doses saved for {nick}")
|
||||
|
||||
doseslogged = wrap(doseslogged)
|
||||
|
||||
@wrap([optional('positiveInt')])
|
||||
def lastdose(self, irc, msg, args, history):
|
||||
@ -329,9 +328,9 @@ class Tripsit(callbacks.Plugin):
|
||||
since_dose_seconds = since_dose.total_seconds()
|
||||
if history:
|
||||
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:
|
||||
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)
|
||||
else:
|
||||
irc.error(f'No doses saved for {nick}')
|
||||
|
@ -1,3 +1,4 @@
|
||||
docopt==0.6.2
|
||||
num2words==0.5.10
|
||||
pytz==2020.5
|
||||
humanize==3.10.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user