#How can i make a slash command only useable for a specific role

1 messages · Page 1 of 1 (latest)

shrewd hatch
#

@bot.slash_command(description='Boosters only')
async def pack(ctx):
await ctx.respond("test", ephemeral=True)

this my code rn

oak zodiac
#

I believe there's a has_any_role decorator

tawdry valley
#

i use it like this @commands.has_role('nameOfRole' or idOfRole)

#

but you need to import
from discord.ext import commands