Skip to content
This repository has been archived by the owner on Aug 1, 2021. It is now read-only.

Commit

Permalink
[guild] add support for system_channel_id & GUILD_MEMBER_JOIN
Browse files Browse the repository at this point in the history
  • Loading branch information
b1naryth1ef committed Aug 17, 2017
1 parent 452574f commit c11ed6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions disco/types/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ class Guild(SlottedModel, Permissible):
The id of the afk channel.
embed_channel_id : snowflake
The id of the embed channel.
system_channel_id : snowflake
The id of the system channel.
name : str
Guild's name.
icon : str
Expand Down Expand Up @@ -301,6 +303,7 @@ class Guild(SlottedModel, Permissible):
owner_id = Field(snowflake)
afk_channel_id = Field(snowflake)
embed_channel_id = Field(snowflake)
system_channel_id = Field(snowflake)
name = Field(text)
icon = Field(text)
splash = Field(text)
Expand Down Expand Up @@ -468,6 +471,10 @@ def icon_url(self):
def splash_url(self):
return self.get_splash_url()

@property
def system_channel(self):
return self.channels.get(self.system_channel_id)

@property
def audit_log(self):
return self.audit_log_iter()
Expand Down
3 changes: 2 additions & 1 deletion disco/types/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
CALL=3,
CHANNEL_NAME_CHANGE=4,
CHANNEL_ICON_CHANGE=5,
PINS_ADD=6
PINS_ADD=6,
GUILD_MEMBER_JOIN=7,
)


Expand Down

0 comments on commit c11ed6d

Please sign in to comment.