From 54126a297c27d478d6ec43e3d61df165b9a8b1ad Mon Sep 17 00:00:00 2001 From: zeragonii Date: Sun, 20 Oct 2024 08:56:16 +0000 Subject: [PATCH] Updated /lfm with channel verification --- bot.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bot.py b/bot.py index bf1ec50..62387d0 100644 --- a/bot.py +++ b/bot.py @@ -66,6 +66,15 @@ async def on_ready(): private="Should the thread be private?" ) async def lfm(interaction: discord.Interaction, type: str, dungeon: str, level: int, private: bool = False): + # Verify the command is being used in the correct channel + allowed_channel_id = 1297217492699320462 # Replace this with the correct channel ID + if interaction.channel.id != allowed_channel_id: + await interaction.response.send_message( + f"This command can only be used in the specific channel (ID: {allowed_channel_id}).", + ephemeral=True + ) + return # Exit the command if the channel ID does not match + if type not in ['pushing', 'completion']: await interaction.response.send_message("Please specify the type as either 'pushing' or 'completion'.", ephemeral=True) return