Skip to content

Commit

Permalink
Updated main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dorythecat committed Aug 18, 2024
1 parent 990fbf8 commit 189fb0a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async def on_message(message: discord.Message) -> None:
transformed_by = bot.get_user(int(data['transformed_by']))
else:
# Get the user who claimed the user
transformed_by = bot.get_user(int(data['claim']))
transformed_by = bot.get_user(data['claim'])
# Check if the message is from the user who transformed this user
if not message.author == transformed_by:
# DM the user who transformed this user the original message they sent
Expand Down Expand Up @@ -261,7 +261,7 @@ async def on_reaction_add(reaction: discord.Reaction, user: discord.User) -> Non
if data_claim not in ["", None]:
await user.send(f"\"{reaction.message.author.name}\" is already claimed by {data_claim}!")
return
utils.write_tf(bot.get_user(tfee), reaction.message.guild, claim_user=user.name)
utils.write_tf(bot.get_user(tfee), reaction.message.guild, claim_user=user.id)
await user.send(f"Successfully claimed \"{reaction.message.author.name}\" for yourself!")
await reaction.message.channel.send(f"{user.mention} has claimed \"{reaction.message.author.name}\"!")

Expand All @@ -281,7 +281,7 @@ async def on_reaction_add(reaction: discord.Reaction, user: discord.User) -> Non
if data_claim != user.name:
await user.send(f"\"{reaction.message.author.name}\" is claimed by {data_claim}! You can't unclaim them!")
return
utils.write_tf(bot.get_user(tfee), reaction.message.guild, claim_user="", eternal=0)
utils.write_tf(bot.get_user(tfee), reaction.message.guild, claim_user=None, eternal=0)

Check notice on line 284 in src/main.py

View workflow job for this annotation

GitHub Actions / qodana

The function argument is equal to the default parameter value

Argument equals to the default parameter value
await user.send(f"Successfully unclaimed \"{reaction.message.author.name}\"!")
await reaction.message.channel.send(f"{user.mention} has unclaimed \"{reaction.message.author.name}\"!")

Expand All @@ -306,7 +306,7 @@ async def on_reaction_add(reaction: discord.Reaction, user: discord.User) -> Non
await reaction.message.channel.send(f"{user.mention} has un-eternally transformed"
f"\"{reaction.message.author.name}\"!")
return
utils.write_tf(bot.get_user(tfee), reaction.message.guild, eternal=1, claim_user=user.name)
utils.write_tf(bot.get_user(tfee), reaction.message.guild, eternal=1, claim_user=user.id)
await user.send(f"Successfully eternally transformed \"{reaction.message.author.name}\"!")
await reaction.message.channel.send(f"{user.mention} has eternally transformed"
f"\"{reaction.message.author.name}\"!")
Expand Down

0 comments on commit 189fb0a

Please sign in to comment.