mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-03-03 13:00:41 +01:00
Add a check for an int id so people who use 'note get' will understand the error message more.
This commit is contained in:
parent
553d7d6060
commit
8d6956f4ae
@ -199,6 +199,11 @@ class Note(callbacks.Privmsg):
|
||||
except KeyError:
|
||||
irc.error(msg, conf.replyNotRegistered)
|
||||
return
|
||||
try:
|
||||
noteid = int(noteid)
|
||||
except ValueError:
|
||||
irc.error(msg, '%r is not a valid note id.' % noteid)
|
||||
return
|
||||
db = self.dbHandler.getDb()
|
||||
cursor = db.cursor()
|
||||
cursor.execute("""SELECT note, to_id, from_id, added_at, public
|
||||
|
Loading…
x
Reference in New Issue
Block a user