disabled many plugins

This commit is contained in:
ChChBot admin 2015-02-18 22:49:55 +01:00
parent 0ba2001b62
commit 7cce9bf27e
119 changed files with 0 additions and 20 deletions

View file

@ -1,16 +0,0 @@
from util import hook, web, text
@hook.command
def answer(inp):
"""answer <query> -- find the answer to a question on Yahoo! Answers"""
query = "SELECT Subject, ChosenAnswer, Link FROM answers.search WHERE query=@query LIMIT 1"
result = web.query(query, {"query": inp.strip()}).one()
short_url = web.try_isgd(result["Link"])
# we split the answer and .join() it to remove newlines/extra spaces
answer_text = text.truncate_str(' '.join(result["ChosenAnswer"].split()), 80)
return u'\x02{}\x02 "{}" - {}'.format(result["Subject"], answer_text, short_url)