mirror of
https://gitlab.com/pancakes1234/wdiscordbotserver.git
synced 2025-06-16 07:14:21 -06:00
Fix: Correct decorator for admin permissions check in logs command
This commit is contained in:
parent
ac8aef2fe3
commit
e3839a9dcb
@ -9,7 +9,7 @@ class TerminalOutput(commands.Cog):
|
||||
self.log_file_path = 'bot.log'
|
||||
|
||||
@app_commands.command(name='logs', description='Shows the bot log output (Admin only)')
|
||||
@app_commands.has_permissions(administrator=True) # Restrict to bot owner, can change to check for admin role if needed
|
||||
@app_commands.checks.has_permissions(administrator=True) # Restrict to bot owner, can change to check for admin role if needed
|
||||
async def show_logs(self, interaction: discord.Interaction):
|
||||
if not os.path.exists(self.log_file_path):
|
||||
await interaction.response.send_message("Log file not found.", ephemeral=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user