First draft for quote/reassure

This commit is contained in:
Robert Miles 2019-11-03 16:19:11 -05:00
parent b8e0559826
commit 6e2fb19e37
1 changed files with 16 additions and 0 deletions

16
commands/quote.py Normal file
View File

@ -0,0 +1,16 @@
import plugin,utils,random,importlib
importlib.reload(utils)
quotes = utils.get("https://github.com/cwarwicker/discord-WriterBot/raw/master/assets/json/en/quotes.json")
reassure = utils.get("https://github.com/cwarwicker/discord-WriterBot/raw/master/assets/json/en/reassure.json")
@plugin.command("quotes")
def _quotes(bot,channel,nick,*args):
quote = random.choice(quotes)
bot.say(channel,"{0}: {1!s}. \"{2[quote]}\" /{2[name]}/".format(nick,quotes.index(quote),quote))
@plugin.command("reassure")
def _reassure(bot,channel,nick,*args):
quote = random.choice(reassure)
bot.say(channel,"{}: {!s}. {}".format(nick,reassure.index(quote),quote))