Browse Source

Changes as requested in PR by FasterSpeeding (https://github.com/FasterSpeeding)

pull/152/head
“elderlabs” 5 years ago
parent
commit
15360b1751
  1. 4
      disco/types/guild.py
  2. 13
      disco/types/user.py

4
disco/types/guild.py

@ -389,7 +389,7 @@ class Guild(SlottedModel, Permissible):
verification_level = Field(enum(VerificationLevel)) verification_level = Field(enum(VerificationLevel))
explicit_content_filter = Field(enum(ExplicitContentFilterLevel)) explicit_content_filter = Field(enum(ExplicitContentFilterLevel))
default_message_notifications = Field(enum(DefaultMessageNotificationsLevel)) default_message_notifications = Field(enum(DefaultMessageNotificationsLevel))
mfa_level = Field(int) mfa_level = Field(enum(MFALevel))
application_id = Field(snowflake) application_id = Field(snowflake)
widget_enabled = Field(bool) widget_enabled = Field(bool)
widget_channel_id = Field(snowflake) widget_channel_id = Field(snowflake)
@ -403,7 +403,7 @@ class Guild(SlottedModel, Permissible):
channels = AutoDictField(Channel, 'id') channels = AutoDictField(Channel, 'id')
roles = AutoDictField(Role, 'id') roles = AutoDictField(Role, 'id')
emojis = AutoDictField(GuildEmoji, 'id') emojis = AutoDictField(GuildEmoji, 'id')
premium_tier = Field(int, default=0) premium_tier = Field(enum(PremiumTier))
premium_subscription_count = Field(int, default=0) premium_subscription_count = Field(int, default=0)
system_channel_flags = Field(int) system_channel_flags = Field(int)
preferred_locale = Field(str) preferred_locale = Field(str)

13
disco/types/user.py

@ -45,7 +45,7 @@ class User(SlottedModel, with_equality('id'), with_hash('id')):
verified = Field(bool) verified = Field(bool)
email = Field(text) email = Field(text)
flags = Field(int) flags = Field(int)
premium_type = Field(int) premium_type = Field(enum(PremiumType))
presence = Field(None) presence = Field(None)
@ -103,10 +103,10 @@ class Status(object):
OFFLINE = 'OFFLINE' OFFLINE = 'OFFLINE'
class ClientStatus(object): class ClientStatus(SlottedModel):
DESKTOP = 'DESKTOP' desktop = Field(str)
MOBILE = 'MOBILE' mobile = Field(str)
WEB = 'WEB' web = Field(str)
class ActivityParty(SlottedModel): class ActivityParty(SlottedModel):
@ -170,5 +170,4 @@ class Presence(SlottedModel):
game = Field(Activity) game = Field(Activity)
guild_id = Field(snowflake) guild_id = Field(snowflake)
status = Field(enum(Status)) status = Field(enum(Status))
activity = Field(Activity, 'application_id') client_status = Field(ClientStatus)
client_status = Field(enum(ClientStatus))

Loading…
Cancel
Save