Skip to content

Commit 1e3a318

Browse files
author
situx
committed
Droggelbecher
1 parent 692ba58 commit 1e3a318

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

langerjan.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ def moin(bot,trigger):
2121
"""Lets the bot reply to a greeting"""
2222
bot.say('moin')
2323

24-
@sopel.module.rule('^\s*[Dd]roggelbecher([?!]+)\s*$')
24+
@sopel.module.rule('^\s*[Dd]roggelbecher([?!]+)?\s*$')
2525
@sopel.module.example('Droggelbecher')
2626
def droggelbecher(bot,trigger):
2727
"""Replys Droggelbecher"""
28-
if "?" in trigger.group(2):
28+
if trigger.group(1) is None:
29+
bot.say('Droggelbecher')
30+
elif "?" in trigger.group(1):
2931
bot.say('Droggelbecher!')
30-
elif "!" in trigger.group(2):
32+
elif "!" in trigger.group(1):
3133
bot.say('Droggelbecher?')
3234
else:
3335
bot.say('Droggelbecher')

0 commit comments

Comments
 (0)