Skip to content

Commit

Permalink
Do not process empty message
Browse files Browse the repository at this point in the history
  • Loading branch information
aluminiumgeek committed Dec 13, 2015
1 parent 4cb2790 commit 9be0656
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/user_cowsay.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ def main(bot, *args):
"""

text = clean_text(' '.join(args))
if not test.strip():
return

process = os.popen(u'cowsay {}'.format(text))
bot.send(text='```{}```'.format(process.read()), data={'parse_mode': 'Markdown'})
process.close()

0 comments on commit 9be0656

Please sign in to comment.