Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Znunu authored Jun 2, 2024
1 parent 4364c51 commit b16556d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions EzMudae.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,27 +138,31 @@ def __init__(self, mudae, user, message):
first_line = first_line.replace(EMOJI_FEMALE, "")
self.series = first_line.strip()

if "React with any emoji to claim!" in lines:
if self.gender is None:
self.type = self.Type.roll
else:
self.type = self.Type.info

for line in lines:
if EMOJI_KAKERA in line:
self.kakera = parse.search("**{}**", line.replace("+", ""))[0]
self.kakera = parse.search("**{:d}**", line.replace("+", ""))[0]
elif "Claim Rank" in line:
self.claims = parse.search("Claim Rank: #{:d}", line)[0]
elif "Like Rank" in line:
self.likes = parse.search("Like Rank: #{:d}", line)[0]

footer = embed.footer.text
if footer is not None:
match = parse.search("Belongs to {} ~~", footer)
match = parse.parse("Belongs to {}", footer.split(" ~~")[0])
if match is not None:
self.owner = match[0].strip()
self.is_claimed = True
else:
self.is_claimed = False
match = parse.search("{:d} / {:d}", footer)
if match is not None and self.gender == self.Type.roll:
raise Exception("This waifu has multiple images but is also missing a gender. this shouldn't happen")


async def fetch_extra(self):
"""
Expand Down

0 comments on commit b16556d

Please sign in to comment.