mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-16 18:59:09 +00:00
Fix typing of move role position payload parameter
This commit is contained in:
parent
cff9ca0288
commit
9d4fa0341e
@ -42,6 +42,7 @@ if TYPE_CHECKING:
|
|||||||
Role as RolePayload,
|
Role as RolePayload,
|
||||||
RoleTags as RoleTagPayload,
|
RoleTags as RoleTagPayload,
|
||||||
)
|
)
|
||||||
|
from .types.guild import RolePositionUpdate
|
||||||
from .guild import Guild
|
from .guild import Guild
|
||||||
from .member import Member
|
from .member import Member
|
||||||
from .state import ConnectionState
|
from .state import ConnectionState
|
||||||
@ -336,7 +337,7 @@ class Role(Hashable):
|
|||||||
else:
|
else:
|
||||||
roles.append(self.id)
|
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)
|
await http.move_role_position(self.guild.id, payload, reason=reason)
|
||||||
|
|
||||||
async def edit(
|
async def edit(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user