Skip to content

Commit

Permalink
Name case
Browse files Browse the repository at this point in the history
  • Loading branch information
MattBSG committed Nov 2, 2024
1 parent 09d2f05 commit 26b8c83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions events/extralife.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ async def donation_check(self):
break

donor_name = 'Anonymous' if not 'displayName' in donation else donation['displayName']
match = re.match(r'[\s\S]+#\d{4}|[a-z0-9._]+', donor_name)
match = re.match(r'[\s\S]+#\d{4}|[a-z0-9._]+', donor_name.lower())
if match:
# Donor name format matches a Discord username
member = discord.utils.find(lambda m: str(m).lower() == match.group(0).lower(), self.guild.members)
member = discord.utils.find(lambda m: str(m) == match.group(0), self.guild.members)
if member:
if self.donorRole not in member.roles:
try:
Expand Down

0 comments on commit 26b8c83

Please sign in to comment.