Is there a way to hide some slash commands from users, i want only admins to have access to the command. So i have verification if is administrator but the users can see the command and when they use the command they get "The application did not respond", i want to hide it from them.
@app_commands.command(name="addmoney", description="Command to add money") @app_commands.checks.has_permissions(administrator=True)
async def add_money(self, interaction: discord.Interaction, member: discord.Member, amount: app_commands.Range[int, MONEY_MIN, MONEY_MAX]):
user_id = member.id
self.collection.update_one({"discord_id": user_id}, {"$inc": {"balance": amount}})
await interaction.response.send_message(f"Succesfully added ${amount} to {member.mention}", ephemeral=True)
await member.send(f"{member.mention}, you have received ${amount} from {interaction.user.mention}")
return