Browse Source

Merge branch 'staging/v1.0.0' into patch2

pull/153/head
Faster Speeding 6 years ago
committed by GitHub
parent
commit
2ec80fc7db
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      disco/gateway/events.py
  2. 3
      disco/state.py
  3. 2
      disco/types/guild.py
  4. 2
      disco/types/permissions.py

12
disco/gateway/events.py

@ -714,3 +714,15 @@ class MessageReactionRemoveAll(GatewayEvent):
@property
def guild(self):
return self.channel.guild
@wraps_model(User)
class UserUpdate(GatewayEvent):
"""
Sent when the client user is updated.
Attributes
-----
user : :class:`disco.types.user.User`
The updated user object.
"""

3
disco/state.py

@ -153,6 +153,9 @@ class State(object):
self.dms[dm.id] = dm
self.channels[dm.id] = dm
def on_user_update(self, event):
self.me.inplace_update(event.user)
def on_message_create(self, event):
if self.config.track_messages:
self.messages[event.message.channel_id].append(

2
disco/types/guild.py

@ -344,7 +344,7 @@ class Guild(SlottedModel, Permissible):
premium_tier = Field(int)
premium_subscription_count = Field(int, default=0)
vanity_url_code = Field(text)
max_presences = Field(int)
max_presences = Field(int, default=5000)
max_members = Field(int)
description = Field(text)

2
disco/types/permissions.py

@ -12,7 +12,7 @@ class Permissions(object):
VIEW_AUDIT_LOG = 1 << 7
PRIORITY_SPEAKER = 1 << 8
STREAM = 1 << 9
READ_MESSAGES = 1 << 10
VIEW_CHANNEL = 1 << 10
SEND_MESSAGES = 1 << 11
SEND_TSS_MESSAGES = 1 << 12
MANAGE_MESSAGES = 1 << 13

Loading…
Cancel
Save