Skip to content

Commit

Permalink
[InviteBlocklist] revert the change to finditer back to findall
Browse files Browse the repository at this point in the history
  • Loading branch information
TrustyJAID committed Jan 11, 2025
1 parent 1ca2b35 commit 3e337d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inviteblocklist/inviteblocklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ async def _handle_message_search(self, message: discord.Message):
if await self.check_immunity_list(message) is True:
log.debug("%r is immune from invite blocklist", message)
return
find = INVITE_RE.finditer(message.clean_content)
find = INVITE_RE.findall(message.clean_content)
guild = message.guild
error_message = (
"There was an error fetching a potential invite link. "
Expand All @@ -190,7 +190,7 @@ async def _handle_message_search(self, message: discord.Message):
return
if whitelist := await self.config.guild(guild).whitelist():
for i in find:
inv = resolve_invite(i.group(0))
inv = resolve_invite(i)
try:
invite = await self.bot.fetch_invite(inv.code)
except discord.errors.NotFound:
Expand All @@ -214,7 +214,7 @@ async def _handle_message_search(self, message: discord.Message):
return
if blacklist := await self.config.guild(guild).blacklist():
for i in find:
inv = resolve_invite(i.group(0))
inv = resolve_invite(i)
try:
invite = await self.bot.fetch_invite(inv.code)
except discord.errors.NotFound:
Expand Down

0 comments on commit 3e337d3

Please sign in to comment.