Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding communication_disabled_until in GuildMember #965

Merged
merged 7 commits into from
Jul 23, 2022
4 changes: 4 additions & 0 deletions interactions/api/models/gw.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class GuildMember(ClientSerializerMixin):
:ivar Optional[bool] deaf?: Whether the member of the event is deafened or not.
:ivar Optional[bool] mute?: Whether the member of the event is muted or not.
:ivar Optional[bool] pending?: Whether the member of the event is still pending -- pass membership screening -- or not.
:ivat Optional[datetime.isoformat] communication_disabled_until?: when the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out.
"""

guild_id: Snowflake = field(converter=Snowflake)
Expand All @@ -258,6 +259,9 @@ class GuildMember(ClientSerializerMixin):
deaf: Optional[bool] = field(default=None)
mute: Optional[bool] = field(default=None)
pending: Optional[bool] = field(default=None)
communication_disabled_until: Optional[datetime.isoformat] = field(
converter=datetime.fromisoformat, default=None
)

def __str__(self) -> str:
return self.name or ""
Expand Down