Merge branch 'refresh' of https://github.com/ClouDev/CloudBot into refresh
This commit is contained in:
commit
68ef55e74d
9 changed files with 70 additions and 134 deletions
|
@ -14,10 +14,10 @@ with open("./data/8ball_responses.txt") as f:
|
|||
f.readlines() if not line.startswith("//")]
|
||||
|
||||
|
||||
@hook.command('8ball')
|
||||
def eightball(inp, action=None):
|
||||
@hook.command()
|
||||
def eightball(input, conn):
|
||||
"""8ball <question> -- The all knowing magic eight ball,
|
||||
in electronic form. Ask and it shall be answered!"""
|
||||
|
||||
magic = text.multiword_replace(random.choice(responses), color_codes)
|
||||
action("shakes the magic 8 ball... {}".format(magic))
|
||||
input.action("shakes the magic 8 ball... {}".format(magic))
|
||||
|
|
|
@ -14,12 +14,12 @@ def get_generator(_json):
|
|||
|
||||
|
||||
@hook.command(autohelp=False)
|
||||
def namegen(inp, notice=None):
|
||||
def namegen(input, instance, bot):
|
||||
"""namegen [generator] -- Generates some names using the chosen generator.
|
||||
'namegen list' will display a list of all generators."""
|
||||
|
||||
# clean up the input
|
||||
inp = inp.strip().lower()
|
||||
inp = input.text.strip().lower()
|
||||
|
||||
# get a list of available name generators
|
||||
files = os.listdir(GEN_DIR)
|
||||
|
@ -33,7 +33,7 @@ def namegen(inp, notice=None):
|
|||
if inp == "list":
|
||||
message = "Available generators: "
|
||||
message += text.get_text_list(all_modules, 'and')
|
||||
notice(message)
|
||||
input.notice(message)
|
||||
return
|
||||
|
||||
if inp:
|
||||
|
|
Reference in a new issue