Add prompt selection
This commit is contained in:
parent
5afeb2f3f6
commit
039e84a554
|
@ -9,5 +9,8 @@ prompts = get("https://khuxkm.tilde.team/prompts.json")["prompts"]
|
|||
|
||||
@plugin.command("prompt","")
|
||||
def prompt(bot,channel,nick,*args):
|
||||
prompt_ = random.choice(prompts)
|
||||
if len(args)==1:
|
||||
prompt_ = prompts[int(args[0])-1]
|
||||
else:
|
||||
prompt_ = random.choice(prompts)
|
||||
bot.say(channel,"{}: {!s}. {}".format(nick,prompts.index(prompt_)+1,prompt_))
|
||||
|
|
Loading…
Reference in New Issue