mirror of
https://github.com/simon987/opendirectories-bot-2.git
synced 2025-04-20 10:36:42 +00:00
Bugfix when no closing quotations
This commit is contained in:
parent
4901236705
commit
1ddf310257
5
run.py
5
run.py
@ -18,7 +18,10 @@ def process_comment(comment, bot):
|
|||||||
text = PATTERN.sub(" ", comment.body).strip()
|
text = PATTERN.sub(" ", comment.body).strip()
|
||||||
|
|
||||||
if text.startswith("u/opendirectories-bot") or text.startswith("/u/opendirectories-bot"):
|
if text.startswith("u/opendirectories-bot") or text.startswith("/u/opendirectories-bot"):
|
||||||
lines = shlex.split(text,)
|
try:
|
||||||
|
lines = shlex.split(text)
|
||||||
|
except ValueError:
|
||||||
|
return
|
||||||
if len(lines) > 1:
|
if len(lines) > 1:
|
||||||
text = lines[1]
|
text = lines[1]
|
||||||
if text.startswith("?"):
|
if text.startswith("?"):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user