Megan
0
Q:

discordpy get role by id

from discord.utils import get

role_id = 123
role = get(guild.roles, id=role_id)
0
guild = ctx.guild
await guild.create_role(name = 'role name',  permissions = discord.Permissions(perrmission = True), reason = 'reason')
    
    
###parameters: 
	role (the name of the new role)
	reason ([optional], the reason you created this role)
	perrmisions (the permissions that the role has/gives to the member with it)
	ctx (mainly for 'ctx.guild', can be used to send 
    	reassurance that the role was created. for example:
    	'await ctx.send(f'{role} was created')
0

New to Communities?

Join the community