Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

fix: fix params for create_channel_invite #723

Merged
merged 2 commits into from
Nov 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions naff/models/discord/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,14 @@ async def create_invite(
target_type = InviteTargetTypes.EMBEDDED_APPLICATION

invite_data = await self._client.http.create_channel_invite(
self.id, max_age, max_uses, temporary, unique, target_type, target_user, target_application, reason
self.id,
max_age,
max_uses,
temporary,
unique,
target_user_id=target_user,
target_application_id=target_application,
reason=reason,
)
return models.Invite.from_dict(invite_data, self._client)

Expand Down Expand Up @@ -1122,12 +1129,7 @@ async def edit_permission(self, overwrite: PermissionOverwrite, reason: Optional
reason: The reason for this change
"""
await self._client.http.edit_channel_permission(
self.id,
overwrite_id=overwrite.id,
allow=overwrite.allow,
deny=overwrite.deny,
perm_type=overwrite.type,
reason=reason,
self.id, overwrite.id, overwrite.allow, overwrite.deny, overwrite.type, reason
LordOfPolls marked this conversation as resolved.
Show resolved Hide resolved
)

async def delete_permission(
Expand Down