add help for a bunch of modules
parent
6606bf18ad
commit
256592b79f
|
@ -9,6 +9,9 @@ import web
|
|||
|
||||
|
||||
def bitcoin(phenny, input):
|
||||
""".bitcoin <amount> <currency> [<output currency]> - Convert an
|
||||
arbitrary amount of some currency to or from Bitcoin."""
|
||||
|
||||
amount = input.group(2)
|
||||
currency = input.group(3)
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ import random
|
|||
otherbot = "truncatedcone"
|
||||
|
||||
def botfight(phenny, input):
|
||||
""".botfight - Fight the other bot in the channel."""
|
||||
|
||||
messages = ["hits %s", "punches %s", "kicks %s", "hits %s with a rubber hose", "stabs %s with a clean kitchen knife"]
|
||||
response = random.choice(messages)
|
||||
|
||||
|
@ -17,6 +19,8 @@ botfight.commands = ['botfight']
|
|||
botfight.priority = 'low'
|
||||
|
||||
def bothug(phenny, input):
|
||||
""".bothug - Hug the other bot in the channel."""
|
||||
|
||||
phenny.do("hugs %s" % otherbot)
|
||||
bothug.commands = ['bothug']
|
||||
bothug.priority = 'low'
|
||||
|
|
|
@ -36,6 +36,7 @@ def decrease_hunger(current_hunger, food_value):
|
|||
return current_hunger + food_value
|
||||
|
||||
def botsnack(phenny, input):
|
||||
""".botsnack - Feed me a bot snack."""
|
||||
|
||||
now = time.time()
|
||||
|
||||
|
|
|
@ -18,7 +18,9 @@ def catfacts_get():
|
|||
return False
|
||||
|
||||
def catfacts(phenny, input):
|
||||
""".catfact - Receive a cat fact."""
|
||||
|
||||
fact = catfacts_get()
|
||||
if fact:
|
||||
phenny.reply(fact)
|
||||
catfacts.commands = ['catfacts']
|
||||
catfacts.commands = ['catfact', 'catfacts']
|
||||
|
|
|
@ -20,7 +20,10 @@ def imdb_search(query):
|
|||
m = json.loads(bytes)
|
||||
return m
|
||||
|
||||
|
||||
def imdb(phenny, input):
|
||||
""".imdb <movie> - Use the OMDB API to find a link to a movie on IMDb."""
|
||||
|
||||
query = input.group(2)
|
||||
if not query:
|
||||
return phenny.say('.imdb what?')
|
||||
|
|
|
@ -11,7 +11,7 @@ import lxml.html
|
|||
|
||||
|
||||
def fml(phenny, input):
|
||||
""".fml"""
|
||||
""".fml - Grab something from fmylife.com."""
|
||||
try:
|
||||
req = web.get("http://www.fmylife.com/random")
|
||||
except:
|
||||
|
|
|
@ -5,6 +5,7 @@ author: Casey Link <unnamedrambler@gmail.com
|
|||
"""
|
||||
|
||||
def nsfw(phenny, input):
|
||||
""".nsfw <link> - Mark a link (or some text) as being not safe for work."""
|
||||
link = input.group(2)
|
||||
if not link:
|
||||
phenny.say(".nsfw <link> - for when a link isn't safe for work")
|
||||
|
|
|
@ -17,6 +17,8 @@ def sloganize(word):
|
|||
return bytes
|
||||
|
||||
def slogan(phenny, input):
|
||||
""".slogan <term> - Come up with a slogan for a term."""
|
||||
|
||||
word = input.group(2)
|
||||
if word is None:
|
||||
phenny.say("You need to specify a word; try .slogan Granola")
|
||||
|
|
|
@ -20,6 +20,8 @@ wikisearch = 'https://vtluug.org/wiki/Special:Search?' \
|
|||
+ 'search={0}&fulltext=Search'
|
||||
|
||||
def vtluug(phenny, input):
|
||||
""".vtluug <term> - Look up something on the VTLUUG wiki."""
|
||||
|
||||
origterm = input.groups()[1]
|
||||
if not origterm:
|
||||
return phenny.say('Perhaps you meant ".vtluug VT-Wireless"?')
|
||||
|
@ -40,7 +42,6 @@ def vtluug(phenny, input):
|
|||
phenny.say(result)
|
||||
else:
|
||||
phenny.say('Can\'t find anything in the VTLUUG Wiki for "{0}".'.format(origterm))
|
||||
|
||||
vtluug.commands = ['vtluug']
|
||||
vtluug.priority = 'high'
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ wikisearch = 'https://en.wikipedia.org/wiki/Special:Search?' \
|
|||
+ 'search={0}&fulltext=Search'
|
||||
|
||||
def wik(phenny, input):
|
||||
""".wik <term> - Look up something on Wikipedia."""
|
||||
|
||||
origterm = input.groups()[1]
|
||||
if not origterm:
|
||||
return phenny.say('Perhaps you meant ".wik Zen"?')
|
||||
|
|
|
@ -90,6 +90,8 @@ def format(word, definitions, number=2):
|
|||
return result.strip(' .,')
|
||||
|
||||
def w(phenny, input):
|
||||
""".w <word> - Get the definition of a word from wiktionary."""
|
||||
|
||||
if not input.group(2):
|
||||
return phenny.reply("Nothing to define.")
|
||||
word = input.group(2)
|
||||
|
|
|
@ -15,6 +15,8 @@ r_play = re.compile(r'^(.*?) - (.*?)$')
|
|||
r_dj = re.compile(r'Current DJ: </span>\n(.+?)<')
|
||||
|
||||
def wuvt(phenny, input):
|
||||
""".wuvt - Find out what is currently playing on the radio station WUVT."""
|
||||
|
||||
try:
|
||||
playing = web.get('http://www.wuvt.vt.edu/playlists/latest_track.php')
|
||||
djpage = web.get('http://www.wuvt.vt.edu/playlists/current_dj.php')
|
||||
|
|
Loading…
Reference in New Issue