From 56a6b67470b10514d8a8ad878b4ac445ca3d86e4 Mon Sep 17 00:00:00 2001 From: Choco <94597336+ChocoMeow@users.noreply.github.com> Date: Mon, 30 Mar 2026 11:01:53 +0800 Subject: [PATCH] Make messages ephemeral and bump discord.py Make certain bot responses ephemeral to avoid spamming channels (debug command and missing-permission reply). Bump discord.py from 2.7.0 to 2.7.1 in requirements. Remove an unused Config().get_playlist_config() assignment in updatePlaylist to clean up dead code. --- cogs/settings.py | 2 +- main.py | 2 +- requirements.txt | 2 +- voicelink/ipc/methods.py | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cogs/settings.py b/cogs/settings.py index 888f0e0..4815334 100644 --- a/cogs/settings.py +++ b/cogs/settings.py @@ -337,7 +337,7 @@ class Settings(commands.Cog, name="settings"): @app_commands.command(name="debug") async def debug(self, interaction: discord.Interaction): if interaction.user.id not in voicelink.Config().bot_access_user: - return await interaction.response.send_message("You are not able to use this command!") + return await interaction.response.send_message("You are not able to use this command!", ephemeral=True) memory = psutil.virtual_memory() disk = psutil.disk_usage(func.ROOT_DIR) diff --git a/main.py b/main.py index 417437a..b2b29b9 100644 --- a/main.py +++ b/main.py @@ -191,7 +191,7 @@ class CommandCheck(discord.app_commands.CommandTree): channel_perm = interaction.channel.permissions_for(interaction.guild.me) if not channel_perm.read_messages or not channel_perm.send_messages: - await interaction.response.send_message("I don't have permission to read or send messages in this channel.") + await interaction.response.send_message("I don't have permission to read or send messages in this channel.", ephemeral=True) return False return True diff --git a/requirements.txt b/requirements.txt index c93bb82..acd6509 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -discord.py==2.7.0 +discord.py==2.7.1 motor==3.6.0 dnspython==2.2.1 tldextract==3.2.1 diff --git a/voicelink/ipc/methods.py b/voicelink/ipc/methods.py index 886bc41..0fcb766 100644 --- a/voicelink/ipc/methods.py +++ b/voicelink/ipc/methods.py @@ -508,7 +508,6 @@ async def updatePlaylist(bot: commands.Bot, data: Dict) -> Dict: if playlist['type'] in ['share', 'link']: return error_msg("You cannot add songs to a linked playlist through Vocard.", user_id=user_id, level='error') - max_p, max_t, _ = Config().get_playlist_config() if len(playlist['tracks']) >= max_t: return error_msg(f"You have reached the limit! You can only add {max_t} songs to your playlist.", user_id=user_id)