mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-23 02:24:12 +01:00
Handled case in last where argument isn't an integer.
This commit is contained in:
parent
c31078339b
commit
9bf2b8a624
@ -481,7 +481,11 @@ class FunCommands(callbacks.Privmsg):
|
||||
if n == '':
|
||||
n = 1
|
||||
else:
|
||||
n = int(n)
|
||||
try:
|
||||
n = int(n)
|
||||
except ValueError:
|
||||
irc.error(msg, '<message number> must be an integer.')
|
||||
return
|
||||
n += 1 # To remove the last question asked.
|
||||
for msg in reviter(irc.state.history):
|
||||
if msg.command == 'PRIVMSG' and msg.args[0] == channel and n == 1:
|
||||
|
Loading…
Reference in New Issue
Block a user