Extend quote command
This commit is contained in:
9
bot.py
9
bot.py
@@ -252,7 +252,14 @@ async def quote_command(ctx: commands.Context, author: Optional[str], *, quote:
|
|||||||
config_set("guild_quotes", quotes, ctx.guild.id)
|
config_set("guild_quotes", quotes, ctx.guild.id)
|
||||||
|
|
||||||
if author is None:
|
if author is None:
|
||||||
pass
|
authors = quotes.keys()
|
||||||
|
if authors:
|
||||||
|
author = random.choice([*authors])
|
||||||
|
author_quotes = quotes[author]
|
||||||
|
quote = '\n'.join(map(lambda line: '> ' + line, random.choice(author_quotes).splitlines()))
|
||||||
|
await ctx.channel.send(quote + '\n**' + author + '**')
|
||||||
|
else:
|
||||||
|
await ctx.channel.send("Unkown author!")
|
||||||
else:
|
else:
|
||||||
author = author.strip().title()
|
author = author.strip().title()
|
||||||
quote = quote.strip()
|
quote = quote.strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user