From 7a54772906afb70bbee00b280f10b4a8fdb8e381 Mon Sep 17 00:00:00 2001 From: Aleteoryx Date: Mon, 27 Oct 2025 20:28:25 -0400 Subject: [PATCH] deemanic influence --- dee.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dee.py b/dee.py index d3ea1b244f7fcc6efbaf4b1eae116e0e9121d3e4..865960fd30c98388afc98fde5168183b3cb089e4 100755 --- a/dee.py +++ b/dee.py @@ -19,17 +19,26 @@ def act(what): botlib.send(f'{NAME} {msg}') def help(nick): - send(f'{nick}, my commands are: "dee, roll ", "dee, shuf[fle] , , and ", and "dee, pick , , or "') + send(f'{nick}, my help is at https://aleteoryx.me/deeman.md') + +last_cmd = ('dee, roll d6', ['dee,', 'roll', 'd6'], ['dee', 'roll', 'd6']) def handle_msg(nick, line, words, pwords): - global NAME + global NAME, last_cmd print(nick, line, words, pwords) + og_data = copy(line), copy(words), copy(pwords) if not botlib.strip_direct_address(NAME, [], words, pwords): return cmd = pwords[0] + + if cmd == 'again': + return handle_msg(nick, *map(copy, last_cmd)) + else: + last_cmd = og_data + pwords.pop(0) words.pop(0)