Added minor documentation

This commit is contained in:
Matthew Ramina
2013-11-28 22:23:32 -05:00
committed by mutantmonkey
parent d6e28ac26b
commit 9219308170
7 changed files with 15 additions and 2 deletions

View File

@@ -75,6 +75,7 @@ r_query = re.compile(
)
def gcs(phenny, input):
"""Compare the number of Google results for the specified paramters."""
if not input.group(2):
return phenny.reply("Nothing to compare.")
queries = r_query.findall(input.group(2))
@@ -93,6 +94,7 @@ def gcs(phenny, input):
reply = ', '.join('%s (%s)' % (t, formatnumber(n)) for (t, n) in results)
phenny.say(reply)
gcs.commands = ['gcs', 'comp']
gcs.example = '.gcs Ronaldo Messi'
r_bing = re.compile(r'<h3><a href="([^"]+)"')
@@ -133,7 +135,8 @@ def duck_search(query):
m = r_duck.search(bytes)
if m: return web.decode(m.group(1))
def duck(phenny, input):
def duck(phenny, input):
"""Queries DuckDuckGo for specified input."""
query = input.group(2)
if not query: return phenny.reply('.ddg what?')
@@ -145,6 +148,7 @@ def duck(phenny, input):
phenny.bot.last_seen_uri[input.sender] = uri
else: phenny.reply("No results found for '%s'." % query)
duck.commands = ['duck', 'ddg']
duck.example = '.duck football'
def search(phenny, input):
if not input.group(2):