Skip to content

Commit

Permalink
Reactions: Encode the user id into the metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
bghira committed Jul 13, 2023
1 parent 27df1df commit 9061578
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discord_tron_master/cogs/events/reactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ async def on_reaction_add(self, reaction, user):
# We have our info.
if reaction.emoji == "©️":
# We want to clone the settings of this post.
logging.debug(f'Would clone settings: user_config {img.info["user_config"]}, prompt {img.info["prompt"]}.')
logging.debug(f'Would clone settings: user_config {img.info["user_config"]}, prompt {img.info["prompt"]}, original_user {img.info["original_user"]}.')
logging.debug(f'User id: {user.id}')
# Set the config:
self.config.set_user_config(user.id, img.info["user_config"])
# Send a message back to the reaction thread/channel:
await reaction.message.channel.send(f'Cloned settings from {user.mention}\'s post for {reaction.user.mention}.')
await reaction.message.channel.send(f'Cloned settings from <@{img.info["original_user"]}>\'s post for {user.mention}.')

@commands.Cog.listener()
async def on_reaction_remove(self, reaction, user):
Expand Down

0 comments on commit 9061578

Please sign in to comment.