“Python Discord Bot tworzy rolę” Kod odpowiedzi

Utwórz rolę z Discord.py

@client.command(aliases=['make_role'])
@commands.has_permissions(manage_roles=True) # Check if the user executing the command can manage roles
async def create_role(ctx, *, name):
	guild = ctx.guild
	await guild.create_role(name=name)
	await ctx.send(f'Role `{name}` has been created')
HelloWorld

Jak stworzyć rolę niezgody

guild = ctx.guild
await guild.create_role(name="role name")
Clean Chinchilla

Python Discord Bot tworzy rolę

@client.command(aliases=['make_role'])
@client.command(aliases=['make_role'])
async def create_role(ctx, *, name):
	guild = ctx.guild
	await guild.create_role(name=name)
	await ctx.send(f'Role `{name}` has been created')
Dan Eduard Cristian

Odpowiedzi podobne do “Python Discord Bot tworzy rolę”

Pytania podobne do “Python Discord Bot tworzy rolę”

Więcej pokrewnych odpowiedzi na “Python Discord Bot tworzy rolę” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu