parent
d15e047bc1
commit
5962fd7c12
|
@ -20,9 +20,10 @@ def last_tilde(msg):
|
||||||
try: data = util.tilde.old_challenges[nick][0]
|
try: data = util.tilde.old_challenges[nick][0]
|
||||||
except KeyError: return err("User hasn't played &tilde from the last boot.")
|
except KeyError: return err("User hasn't played &tilde from the last boot.")
|
||||||
if callable(data):
|
if callable(data):
|
||||||
data = inspect.getclosurevars(data).nonlocals
|
datax = inspect.getclosurevars(data).nonlocals
|
||||||
if len(data) == 0:
|
if len(datax) == 0:
|
||||||
data = inspect.getsource(data)
|
data = inspect.getsource(data)
|
||||||
|
else: data = datax
|
||||||
if answer is None:
|
if answer is None:
|
||||||
data = str(data)
|
data = str(data)
|
||||||
answer = f"{pnick}'s last tilde's answer was supposed to be `{data}`."
|
answer = f"{pnick}'s last tilde's answer was supposed to be `{data}`."
|
||||||
|
|
Loading…
Reference in New Issue