Added reverse to utility.py

This commit is contained in:
Nathan Blaney 2013-10-05 22:49:52 +10:00
parent 8a6803a22a
commit d83d82978e
1 changed files with 7 additions and 0 deletions

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 message %s, I message %s" % (inp, inp[::-1])
# hashing
@hook.command