Skip to content

Commit aef184a

Browse files
committed
fix: hide prefix app command from non-admin
1 parent db9a60d commit aef184a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cogs/prefix.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import TYPE_CHECKING
44

55
from discord.ext import commands
6+
from discord import app_commands
67

78
if TYPE_CHECKING:
89
from discord import Guild
@@ -44,6 +45,7 @@ async def on_guild_remove(self, guild: Guild) -> None:
4445

4546
@commands.hybrid_command(name="prefix")
4647
@commands.has_permissions(administrator=True)
48+
@app_commands.default_permissions(administrator=True)
4749
@commands.guild_only()
4850
async def prefix(self, ctx: commands.Context[Bot], prefix: str) -> None:
4951
"""change bot prefix"""

0 commit comments

Comments
 (0)