Fix quote reorganization
This commit is contained in:
6
bot.py
6
bot.py
@@ -267,10 +267,10 @@ async def quote_command(ctx: commands.Context, author: Optional[str], *, quote:
|
||||
quote = quote[0].upper() + quote[1::]
|
||||
if author in quotes:
|
||||
author_quotes: List[str] = quotes[author]
|
||||
regex = re.compile(r'[\W]')
|
||||
stripped_quote = regex.sub(quote, '').lower()
|
||||
regex = re.compile(r'\W')
|
||||
stripped_quote = regex.sub('', quote).lower()
|
||||
for aq in author_quotes:
|
||||
if regex.sub(aq, '').lower() == stripped_quote:
|
||||
if regex.sub('', aq).lower() == stripped_quote:
|
||||
await ctx.channel.send("Quote already exists!")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user