@@ 19,17 19,26 @@ def act(what):
botlib.send(f'{NAME} {msg}')
def help(nick):
- send(f'{nick}, my commands are: "dee, roll <dice>", "dee, shuf[fle] <A>, <B>, and <C>", and "dee, pick <A>, <B>, or <C>"')
+ 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)