2012-05-14 16:44:38 -04:00
|
|
|
#!/usr/bin/python3
|
|
|
|
"""
|
|
|
|
commit.py - what the commit
|
|
|
|
author: mutantmonkey <mutantmonkey@mutantmonkey.in>
|
|
|
|
"""
|
|
|
|
|
|
|
|
import web
|
2012-06-02 01:17:09 -04:00
|
|
|
from tools import GrumbleError
|
2012-05-14 16:44:38 -04:00
|
|
|
|
2013-06-09 01:27:24 -04:00
|
|
|
|
2012-05-14 16:44:38 -04:00
|
|
|
def commit(phenny, input):
|
|
|
|
""".commit - Get a What the Commit commit message."""
|
|
|
|
|
|
|
|
try:
|
|
|
|
msg = web.get("http://whatthecommit.com/index.txt")
|
2013-06-09 01:27:24 -04:00
|
|
|
except:
|
2012-06-02 01:17:09 -04:00
|
|
|
raise GrumbleError("THE INTERNET IS FUCKING BROKEN. Please try again later.")
|
|
|
|
|
2012-05-14 16:44:38 -04:00
|
|
|
phenny.reply(msg)
|
|
|
|
commit.commands = ['commit']
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
print(__doc__.strip())
|