Compare commits
No commits in common. "b48f2a1eff20996901e8db40d68c880a5d7f053f" and "13ee0683582498cedc66d2e3a14cb32510392135" have entirely different histories.
b48f2a1eff
...
13ee068358
@ -20,8 +20,6 @@ class NewAccount(commands.Cog):
|
|||||||
@app_commands.check(lambda inter: JELLYFIN_ENABLED)
|
@app_commands.check(lambda inter: JELLYFIN_ENABLED)
|
||||||
async def newaccount(self, interaction: discord.Interaction) -> None:
|
async def newaccount(self, interaction: discord.Interaction) -> None:
|
||||||
"""Create a new temporary Jellyfin account"""
|
"""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
|
# Make sure the user doesn't already have an account
|
||||||
with Session() as session:
|
with Session() as session:
|
||||||
account = (
|
account = (
|
||||||
@ -40,7 +38,9 @@ class NewAccount(commands.Cog):
|
|||||||
),
|
),
|
||||||
color=0xD01B86,
|
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
|
# Create a new Jellyfin account for the user
|
||||||
response = create_jellyfin_account(interaction.user.id)
|
response = create_jellyfin_account(interaction.user.id)
|
||||||
@ -53,7 +53,9 @@ class NewAccount(commands.Cog):
|
|||||||
),
|
),
|
||||||
color=0xD01B86,
|
color=0xD01B86,
|
||||||
)
|
)
|
||||||
await interaction.followup.send(embed=embed)
|
await interaction.response.send_message(
|
||||||
|
embed=embed, ephemeral=True
|
||||||
|
)
|
||||||
|
|
||||||
# Send the user their account information
|
# Send the user their account information
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
@ -81,7 +83,9 @@ class NewAccount(commands.Cog):
|
|||||||
),
|
),
|
||||||
color=0xD01B86,
|
color=0xD01B86,
|
||||||
)
|
)
|
||||||
return await interaction.followup.send(embed=embed)
|
return await interaction.response.send_message(
|
||||||
|
embed=embed, ephemeral=True
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
async def setup(bot):
|
async def setup(bot):
|
||||||
|
@ -200,15 +200,13 @@ class Status(commands.Cog):
|
|||||||
session.commit()
|
session.commit()
|
||||||
|
|
||||||
# If series and only a portion of episodes have been downloaded
|
# If series and only a portion of episodes have been downloaded
|
||||||
# If data["statistics"] exists and is not None
|
if data.get("statistics").get("percentOfEpisodes"):
|
||||||
if "statistics" in data and data["statistics"] != None:
|
description += (
|
||||||
if "percentOfEpisodes" in data["statistics"]:
|
f"\n**{title} ({release_year})** - Status: `NOT"
|
||||||
description += (
|
" FOUND"
|
||||||
f"\n**{title} ({release_year})** - Status: `NOT"
|
f" ({int(data['statistics']['percentOfEpisodes'])}%"
|
||||||
" FOUND"
|
" of eps.)`"
|
||||||
f" ({int(data['statistics']['percentOfEpisodes'])}%"
|
)
|
||||||
" of eps.)`"
|
|
||||||
)
|
|
||||||
# All other scenarios, download not found
|
# All other scenarios, download not found
|
||||||
else:
|
else:
|
||||||
description += (
|
description += (
|
||||||
|
@ -148,8 +148,7 @@ class RequestButtonView(discord.ui.View):
|
|||||||
),
|
),
|
||||||
color=0xD01B86,
|
color=0xD01B86,
|
||||||
)
|
)
|
||||||
await interaction.response.edit_message(view=None)
|
await interaction.response.send_message(embed=embed, view=None)
|
||||||
await interaction.followup.send(embed=embed)
|
|
||||||
# Alert the user that the content failed to be added
|
# Alert the user that the content failed to be added
|
||||||
else:
|
else:
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
@ -160,8 +159,9 @@ class RequestButtonView(discord.ui.View):
|
|||||||
f" {self.service} library."
|
f" {self.service} library."
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
await interaction.delete_original_response()
|
return await interaction.response.edit_message(
|
||||||
return await interaction.response.edit_message(embed=embed)
|
embed=embed, view=None
|
||||||
|
)
|
||||||
|
|
||||||
# Keep track of the requests for the `/status` command
|
# Keep track of the requests for the `/status` command
|
||||||
with Session() as session:
|
with Session() as session:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user