Skip to content

Commit

Permalink
Merge pull request scrapinghub#19 from DataGreed/master
Browse files Browse the repository at this point in the history
fixed a crash that occurred when bot tried to list available commands...
  • Loading branch information
lins05 committed Jul 1, 2015
2 parents 019292b + bcaf3fc commit f8fe995
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slackbot/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def _default_reply(self, msg):
default_reply = [
u'Bad command "%s", You can ask me one of the following questions:\n' % msg['text'],
]
default_reply += [u' • `%s`' % str(p.pattern) for p in self._plugins.commands['respond_to'].iterkeys()]
default_reply += [u' • `{}`'.format(p.pattern) for p in self._plugins.commands['respond_to'].iterkeys()]

self._client.rtm_send_message(msg['channel'],
'\n'.join(to_utf8(default_reply)))
Expand All @@ -116,7 +116,7 @@ def _get_user_id(self):
return self._client.find_user_by_name(self._body['username'])

def _gen_at_message(self, text):
text = '<@{}>: {}'.format(self._get_user_id(), text)
text = u'<@{}>: {}'.format(self._get_user_id(), text)
return text

def _gen_reply(self, text):
Expand Down

0 comments on commit f8fe995

Please sign in to comment.