From 137c1474eed5fb4273e542bd22ad76764a8712fc Mon Sep 17 00:00:00 2001 From: baronkobama Date: Wed, 15 Jun 2022 13:49:01 -0500 Subject: [PATCH] Fixing some types --- discord/types/audit_log.py | 1 + discord/types/channel.py | 3 ++- discord/types/guild.py | 4 ++-- discord/types/invite.py | 4 ++-- discord/types/member.py | 4 ++-- discord/types/webhook.py | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/discord/types/audit_log.py b/discord/types/audit_log.py index 273b6e1bb0..ce7dde7914 100644 --- a/discord/types/audit_log.py +++ b/discord/types/audit_log.py @@ -90,6 +90,7 @@ 110, 111, 112, + 121, ] diff --git a/discord/types/channel.py b/discord/types/channel.py index e2f2de5d54..2b7c2d3a8d 100644 --- a/discord/types/channel.py +++ b/discord/types/channel.py @@ -140,7 +140,8 @@ class ThreadChannel(_BaseChannel, _ThreadChannelOptional): ] -class DMChannel(_BaseChannel): +class DMChannel(TypedDict): + id: Snowflake type: Literal[1] last_message_id: Optional[Snowflake] recipients: List[PartialUser] diff --git a/discord/types/guild.py b/discord/types/guild.py index 7ecaaa96b1..49123be0b6 100644 --- a/discord/types/guild.py +++ b/discord/types/guild.py @@ -133,7 +133,7 @@ class _GuildPreviewUnique(TypedDict): class GuildPreview(_BaseGuildPreview, _GuildPreviewUnique): - ... + pass class Guild(_BaseGuildPreview, _GuildOptional): @@ -163,7 +163,7 @@ class InviteGuild(Guild, total=False): class GuildWithCounts(Guild, _GuildPreviewUnique): - ... + pass class GuildPrune(TypedDict): diff --git a/discord/types/invite.py b/discord/types/invite.py index a36d7e0592..3cd29f9d5b 100644 --- a/discord/types/invite.py +++ b/discord/types/invite.py @@ -65,11 +65,11 @@ class IncompleteInvite(_InviteMetadata): class Invite(IncompleteInvite, _InviteOptional): - ... + pass class InviteWithCounts(Invite, _GuildPreviewUnique): - ... + pass class _GatewayInviteCreateOptional(TypedDict, total=False): diff --git a/discord/types/member.py b/discord/types/member.py index a663d591e6..c6fdf6183a 100644 --- a/discord/types/member.py +++ b/discord/types/member.py @@ -36,8 +36,8 @@ class Nickname(TypedDict): class PartialMember(TypedDict): roles: SnowflakeList joined_at: str - deaf: str - mute: str + deaf: bool + mute: bool class Member(PartialMember, total=False): diff --git a/discord/types/webhook.py b/discord/types/webhook.py index f88e58d838..a3c5a03acd 100644 --- a/discord/types/webhook.py +++ b/discord/types/webhook.py @@ -70,4 +70,4 @@ class _FullWebhook(TypedDict, total=False): class Webhook(PartialWebhook, _FullWebhook): - ... + pass