Skip to content

Commit 8fb3491

Browse files
committed
Handle unknown sign in horoscope command
1 parent 32748a4 commit 8fb3491

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

plugins/horoscope.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
@hook.command(autohelp=False)
19-
def horoscope(text, db, bot, nick, notice_doc):
19+
def horoscope(text, db, bot, nick, notice, notice_doc):
2020
"""[sign] - get your horoscope"""
2121
signs = {
2222
'aries': '1',
@@ -50,6 +50,10 @@ def horoscope(text, db, bot, nick, notice_doc):
5050
return
5151
sign = sign[0].strip().lower()
5252

53+
if sign not in signs:
54+
notice("Unknown sign: {}".format(sign))
55+
return
56+
5357
params = {
5458
"sign": signs[sign]
5559
}

0 commit comments

Comments
 (0)