瀏覽代碼

Adjust messages again.

pull/9/head
Ben Kurtovic 11 年之前
父節點
當前提交
f3cf50b9ce
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. +3
    -1
      commands/urbandictionary.py

+ 3
- 1
commands/urbandictionary.py 查看文件

@@ -28,7 +28,9 @@ class UrbanDictionary(Command):
if res['result_type'] == 'exact':
definition = re.sub(r"\s+", " ", res['list'][0]['definition'])
example = re.sub(r"\s+", " ", res['list'][0]['example'])
msg = '{0}; example: {1}'.format(definition, example)
if definition and definition[-1] not in (".", "!", "?"):
definition += "."
msg = '{0} \x02Example\x0F: {1}'.format(definition, example)
self.reply(data, msg)
elif res['result_type'] == 'fulltext':
L = [i['word'] for i in res['list']]


Loading…
取消
儲存