minetestbot-modules/shortutils.py

41 lines
1.3 KiB
Python
Raw Normal View History

2013-09-06 15:02:57 -07:00
#!/usr/bin/env python
"""
shortutil.py - Phenny Custom Shortcut Module
Copyright 2013 jmf
Licensed under the WTFPL.
http://www.wtfpl.net/txt/copying/
Module for phenny:
http://inamidst.com/phenny/
"""
def rtfm(phenny, input):
"""Manual reference command"""
for x in phenny.bot.commands["high"].values():
if x[0].__name__ == "aa_hook":
if x[0](phenny, input):
return
phenny.say("Somebody thinks you should read the manual. The wiki for dev related questions is at http://dev.minetest.net , the regular wiki is at http://wiki.minetest.net. ")
2013-09-09 10:52:20 -07:00
rtfm.commands = ['rtfm']
2013-09-06 15:02:57 -07:00
2013-09-09 09:48:24 -07:00
def questions(phenny, input):
2013-09-06 15:02:57 -07:00
"""Ask smart questions"""
for x in phenny.bot.commands["high"].values():
if x[0].__name__ == "aa_hook":
if x[0](phenny, input):
return
phenny.say("Someone thinks that your question is inaccurate or doesn't follow the guidelines. Read here how to make it right: http://catb.org/~esr/faqs/smart-questions.html")
2013-09-09 10:52:20 -07:00
questions.commands = ['questions']
2013-09-06 15:02:57 -07:00
def next(phenny, input):
"""Next one please"""
for x in phenny.bot.commands["high"].values():
if x[0].__name__ == "aa_hook":
if x[0](phenny, input):
return
phenny.say("Another satisfied customer. Next!")
2013-09-09 10:52:20 -07:00
next.commands = ['next']