remove dis (#3704)

This commit is contained in:
jack1142 2020-03-28 23:45:37 +01:00 committed by GitHub
parent 97d77f5c51
commit dacfb931bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,4 @@
import logging import logging
import re
from datetime import datetime, timedelta from datetime import datetime, timedelta
from typing import Union, List, Callable, Set from typing import Union, List, Callable, Set
@ -487,16 +486,7 @@ class Cleanup(commands.Cog):
me = ctx.guild.me me = ctx.guild.me
can_mass_purge = channel.permissions_for(me).manage_messages can_mass_purge = channel.permissions_for(me).manage_messages
use_re = match_pattern and match_pattern.startswith("r(") and match_pattern.endswith(")") if match_pattern:
if use_re:
match_pattern = match_pattern[1:] # strip 'r'
match_re = re.compile(match_pattern)
def content_match(c):
return bool(match_re.match(c))
elif match_pattern:
def content_match(c): def content_match(c):
return match_pattern in c return match_pattern in c