Some small quote improvements
This commit is contained in:
6
bot.py
6
bot.py
@@ -257,13 +257,13 @@ async def quote_command(ctx: commands.Context, author: Optional[str], *, quote:
|
||||
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 + '**')
|
||||
await ctx.channel.send(quote + '\n *~' + author + '*')
|
||||
else:
|
||||
await ctx.channel.send("No quotes present!")
|
||||
else:
|
||||
author = author.strip().title()
|
||||
if quote:
|
||||
quote = quote.strip()
|
||||
quote = quote.strip().capitalize()
|
||||
if author in quotes:
|
||||
author_quotes: List[str] = quotes[author]
|
||||
regex = re.compile(r'[\W]')
|
||||
@@ -285,7 +285,7 @@ async def quote_command(ctx: commands.Context, author: Optional[str], *, quote:
|
||||
if author in quotes:
|
||||
quote = random.choice(quotes[author])
|
||||
quote = '\n'.join(map(lambda line: '> ' + line, quote.splitlines()))
|
||||
await ctx.channel.send(quote + '\n**' + author + '**')
|
||||
await ctx.channel.send(quote + '\n *~ ' + author + '*')
|
||||
else:
|
||||
await ctx.channel.send("Unknown author!")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user