From 9d4fa0341ee7c5340b745d268c1ceb72c4b28cee Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 23 Aug 2021 23:18:35 -0400 Subject: [PATCH] Fix typing of move role position payload parameter --- discord/role.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discord/role.py b/discord/role.py index 4bf5ab49b..86df9255a 100644 --- a/discord/role.py +++ b/discord/role.py @@ -42,6 +42,7 @@ if TYPE_CHECKING: Role as RolePayload, RoleTags as RoleTagPayload, ) + from .types.guild import RolePositionUpdate from .guild import Guild from .member import Member from .state import ConnectionState @@ -336,7 +337,7 @@ class Role(Hashable): else: roles.append(self.id) - payload = [{"id": z[0], "position": z[1]} for z in zip(roles, change_range)] + payload: List[RolePositionUpdate] = [{"id": z[0], "position": z[1]} for z in zip(roles, change_range)] await http.move_role_position(self.guild.id, payload, reason=reason) async def edit(