mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
remove dis (#3704)
This commit is contained in:
parent
97d77f5c51
commit
dacfb931bb
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user