Compare commits

..

No commits in common. "b48f2a1eff20996901e8db40d68c880a5d7f053f" and "13ee0683582498cedc66d2e3a14cb32510392135" have entirely different histories.

3 changed files with 20 additions and 18 deletions

View File

@ -20,8 +20,6 @@ class NewAccount(commands.Cog):
@app_commands.check(lambda inter: JELLYFIN_ENABLED)
async def newaccount(self, interaction: discord.Interaction) -> None:
"""Create a new temporary Jellyfin account"""
# Defer in case it takes too long
await interaction.response.defer(ephemeral=True)
# Make sure the user doesn't already have an account
with Session() as session:
account = (
@ -40,7 +38,9 @@ class NewAccount(commands.Cog):
),
color=0xD01B86,
)
return await interaction.followup.send(embed=embed)
return await interaction.response.send_message(
embed=embed, ephemeral=True
)
# Create a new Jellyfin account for the user
response = create_jellyfin_account(interaction.user.id)
@ -53,7 +53,9 @@ class NewAccount(commands.Cog):
),
color=0xD01B86,
)
await interaction.followup.send(embed=embed)
await interaction.response.send_message(
embed=embed, ephemeral=True
)
# Send the user their account information
embed = discord.Embed(
@ -81,7 +83,9 @@ class NewAccount(commands.Cog):
),
color=0xD01B86,
)
return await interaction.followup.send(embed=embed)
return await interaction.response.send_message(
embed=embed, ephemeral=True
)
async def setup(bot):

View File

@ -200,15 +200,13 @@ class Status(commands.Cog):
session.commit()
# If series and only a portion of episodes have been downloaded
# If data["statistics"] exists and is not None
if "statistics" in data and data["statistics"] != None:
if "percentOfEpisodes" in data["statistics"]:
description += (
f"\n**{title} ({release_year})** - Status: `NOT"
" FOUND"
f" ({int(data['statistics']['percentOfEpisodes'])}%"
" of eps.)`"
)
if data.get("statistics").get("percentOfEpisodes"):
description += (
f"\n**{title} ({release_year})** - Status: `NOT"
" FOUND"
f" ({int(data['statistics']['percentOfEpisodes'])}%"
" of eps.)`"
)
# All other scenarios, download not found
else:
description += (

View File

@ -148,8 +148,7 @@ class RequestButtonView(discord.ui.View):
),
color=0xD01B86,
)
await interaction.response.edit_message(view=None)
await interaction.followup.send(embed=embed)
await interaction.response.send_message(embed=embed, view=None)
# Alert the user that the content failed to be added
else:
embed = discord.Embed(
@ -160,8 +159,9 @@ class RequestButtonView(discord.ui.View):
f" {self.service} library."
),
)
await interaction.delete_original_response()
return await interaction.response.edit_message(embed=embed)
return await interaction.response.edit_message(
embed=embed, view=None
)
# Keep track of the requests for the `/status` command
with Session() as session: