The library is currently lacking an intuitive way to move a role's position.
Changes
modify_guild_role_positions() now takes a list. This reflects how the API handles position changes.
models.Role now has the move() function
Test Scenario(s)
from naff.client import Client
from naff import listen
bot = Client(debug_scope=<guild_id>)
@listen()
async def on_startup():
print("Bot is ready!")
guild = await bot.fetch_guild(<guild_id>)
role = await guild.fetch_role(<role_id>)
await role.move(len(guild.roles) - 2) # Moving the role 2 from top role (@@everyone)
bot.start("token")
What type of pull request is this?
Description
The library is currently lacking an intuitive way to move a role's position.
Changes
Test Scenario(s)
Checklist
Python 3.10.x
Python 3.11.x