Merge remote-tracking branch 'origin/develop' into refresh
This commit is contained in:
commit
43d4d282f7
2 changed files with 13 additions and 3 deletions
|
@ -50,8 +50,8 @@ def ghissues(inp):
|
||||||
return "Repo has no open issues"
|
return "Repo has no open issues"
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return "Invalid data returned. Check arguments (.github issues username/repo [number]"
|
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))
|
fmt = "Issue: #{} ({}) by {}: {} | {} {}" # (number, state, user.login, title, truncate(body), gitio.gitio(data.url))
|
||||||
fmt1 = "Issue: #{} ({}) by {}: {} {}".format(number, state, user.login, title, gitio.gitio(data.url))
|
fmt1 = "Issue: #{} ({}) by {}: {} {}" # (number, state, user.login, title, gitio.gitio(data.url))
|
||||||
number = data["number"]
|
number = data["number"]
|
||||||
if data["state"] == "open":
|
if data["state"] == "open":
|
||||||
state = u"\x033\x02OPEN\x02\x0f"
|
state = u"\x033\x02OPEN\x02\x0f"
|
||||||
|
|
|
@ -109,6 +109,13 @@ def length(inp):
|
||||||
"""length <string> -- gets the length of <string>"""
|
"""length <string> -- gets the length of <string>"""
|
||||||
return "The length of that string is {} characters.".format(len(inp))
|
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
|
# hashing
|
||||||
|
|
||||||
@hook.command
|
@hook.command
|
||||||
|
@ -134,6 +141,9 @@ def rainbow(inp):
|
||||||
out = ""
|
out = ""
|
||||||
l = len(colors)
|
l = len(colors)
|
||||||
for i, t in enumerate(inp):
|
for i, t in enumerate(inp):
|
||||||
|
if t == " ":
|
||||||
|
out += t
|
||||||
|
else:
|
||||||
out += col[i % l][1] + t
|
out += col[i % l][1] + t
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
Reference in a new issue