Merge remote-tracking branch 'origin/develop' into refresh

This commit is contained in:
Luke Rogers 2013-10-06 15:21:28 +13:00
commit 43d4d282f7
2 changed files with 13 additions and 3 deletions

View file

@ -50,8 +50,8 @@ def ghissues(inp):
return "Repo has no open issues"
except ValueError:
return "Invalid data returned. Check arguments (.github issues username/repo [number]"
fmt = "Issue: #{} ({}) by {}: {} | {} {}".format(number, state, user.login, title, truncate(body), gitio.gitio(data.url))
fmt1 = "Issue: #{} ({}) by {}: {} {}".format(number, state, user.login, title, gitio.gitio(data.url))
fmt = "Issue: #{} ({}) by {}: {} | {} {}" # (number, state, user.login, title, truncate(body), gitio.gitio(data.url))
fmt1 = "Issue: #{} ({}) by {}: {} {}" # (number, state, user.login, title, gitio.gitio(data.url))
number = data["number"]
if data["state"] == "open":
state = u"\x033\x02OPEN\x02\x0f"

View file

@ -109,6 +109,13 @@ def length(inp):
"""length <string> -- gets the length of <string>"""
return "The length of that string is {} characters.".format(len(inp))
# reverse
@hook.command
def reverse(inp):
"""Enter a string and the bot will reverse it and print it out."""
return "You say %s, I say %s" % (inp, inp[::-1])
# hashing
@hook.command
@ -134,6 +141,9 @@ def rainbow(inp):
out = ""
l = len(colors)
for i, t in enumerate(inp):
if t == " ":
out += t
else:
out += col[i % l][1] + t
return out