Discord.py แอดมิเพียงคำสั่งของเกิดข้อผิดพลาด

รหัสตัวอย่าง

3
0

discord.py ทำให้คำสั่งผู้ดูแดเดียว

# Make sure you don't have a command called "commands"
@client.command() # As usual
@commands.has_permissions(administrator=True) # Making sure the person executing the command has the permissions
async def foo(ctx):
	await ctx.send("Hello")
    #ect
0
0

วิธีเดียวที่ปล่อยให้แอดมินทำเป็นคำสั่งใน discord.py

@commands.has_permissions(administrator=True)
@client.command() 
async def admins_only_command(ctx, *, args):
    # ur code

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................