Skip to content

Commit

Permalink
Refactored main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dorythecat committed Jun 18, 2024
1 parent 81178a6 commit d184c4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async def transform_function(ctx: discord.ApplicationContext,
if "?" in image_url: # Prune url, if possible, to preserve space
image_url = image_url[:image_url.index("?")]

utils.write_tf(user, ctx.guild, channel, None, str(ctx.author.id), into, image_url)
utils.write_tf(user, ctx.guild, channel, transformed_by=str(ctx.author.id), into=into, image_url=image_url)

Check failure on line 35 in main.py

View workflow job for this annotation

GitHub Actions / Qodana for Python

Unresolved references

Unresolved reference 'str'
utils.write_transformed(ctx.guild, user, channel)
return True

Expand Down Expand Up @@ -882,7 +882,7 @@ async def block_channel(ctx: discord.ApplicationContext,
channel: discord.TextChannel = None) -> None:
if channel is None:
channel = ctx.channel
utils.write_tf(ctx.author, ctx.guild, None, channel)
utils.write_tf(ctx.author, ctx.guild, block_channel=channel)
word = "yourself" if str(channel.id) in utils.load_tf(ctx.user, ctx.guild)['blocked_channels'] else "transformed"

Check failure on line 886 in main.py

View workflow job for this annotation

GitHub Actions / Qodana for Python

Unresolved references

Unresolved reference 'str'
channel_word = "this channel" if channel == ctx.channel else channel.mention
await ctx.respond(f"You will now be {word} in {channel_word}!")
Expand Down

0 comments on commit d184c4e

Please sign in to comment.