Skip to content
Permalink
Browse files

Fix karma-bot bugs

  • Loading branch information...
selevit committed Jan 22, 2017
1 parent a8041d9 commit 47cb9534134c8e025e143279000cb106a9ebf9d7
Showing with 3 additions and 4 deletions.
  1. +1 −1 karma-bot/bot-spec.yml
  2. +2 −3 karma-bot/karma.py
@@ -28,4 +28,4 @@ test_cases:
result: "^Количество пользователей в /karma top \\[n\\] должно быть > 0.$"

- command: "/karma-top 10"
result: "^Топ 1 пользователей:\\n\\n- selevit: 1\\n$"
result: "^Топ 1 пользователей:\\\\n\\\\n- selevit: 1\\\\n$"
@@ -215,9 +215,8 @@ def _process_top(self, cmd, message):
if len(results) == 0:
return 'Статистика кармы пользователей пуста.'

message = 'Топ {} пользователей:\n\n'.format(len(results))
message = 'Топ {} пользователей:\\n\\n'.format(len(results))
for k, v in results.items():
message += '- {}: {}\n'.format(k, v)
break
message += '- {}: {}\\n'.format(k, v)

return message

0 comments on commit 47cb953

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.