from discord.utils import get
@bot.command()
async def komut(ctx):
role = get(ctx.guild.roles, name="Belirli_Rol_Adı")
if role in ctx.author.roles:
# Rol kontrolü başarılı olduğunda burası çalışır
await ctx.send("Bu komutu kullanabilirsiniz.")
else:
# Rol kontrolü başarısız olduğunda burası çalışır
await ctx.send("Bu komutu kullanmaya yetkiniz yok.")