From d64d29104b02daa49d3ae1b23fccfc5573c6733c Mon Sep 17 00:00:00 2001 From: artie Date: Sat, 25 May 2024 19:15:32 +0200 Subject: [PATCH] user-installable apps --- artemis/cogs/language.py | 4 ++++ requirements.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/artemis/cogs/language.py b/artemis/cogs/language.py index 87b173b..6cfd642 100644 --- a/artemis/cogs/language.py +++ b/artemis/cogs/language.py @@ -89,6 +89,8 @@ async def get_deepl_languages(): # Translation slash commands @app_commands.context_menu(name="Translate (DeepL)") +@app_commands.allowed_installs(guilds=False, users=True) +@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True) async def deepl_slash(interaction: discord.Interaction, message: discord.Message): await interaction.response.defer(ephemeral=True) @@ -123,6 +125,8 @@ async def deepl_slash(interaction: discord.Interaction, message: discord.Message @app_commands.context_menu(name="Translate (Google)") +@app_commands.allowed_installs(guilds=False, users=True) +@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True) async def gt_slash(interaction: discord.Interaction, message: discord.Message): await interaction.response.defer(ephemeral=True) diff --git a/requirements.txt b/requirements.txt index 2503dd1..4fe70c3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ wheel aiocache aiosqlite -discord.py +discord.py[voice]@git+https://github.com/rapptz/discord.py PyNaCl>=1.3.0,<1.5 beautifulsoup4 black