Browse Source

Misc. nitpicks

pull/10109/head
dolfies 4 years ago
parent
commit
78471ad2bc
  1. 4
      discord/mentions.py
  2. 2
      discord/tracking.py

4
discord/mentions.py

@ -135,9 +135,9 @@ class AllowedMentions:
return data # type: ignore return data # type: ignore
def merge(self, other: AllowedMentions) -> AllowedMentions: def merge(self, other: AllowedMentions) -> AllowedMentions:
# Creates a new AllowedMentions by merging from another one. # Creates a new AllowedMentions by merging from another one
# Merge is done by using the 'self' values unless explicitly # Merge is done by using the 'self' values unless explicitly
# overridden by the 'other' values. # overridden by the 'other' values
everyone = self.everyone if other.everyone is default else other.everyone everyone = self.everyone if other.everyone is default else other.everyone
users = self.users if other.users is default else other.users users = self.users if other.users is default else other.users
roles = self.roles if other.roles is default else other.roles roles = self.roles if other.roles is default else other.roles

2
discord/tracking.py

@ -70,7 +70,7 @@ class ContextProperties: # Thank you Discord-S.C.U.M
try: try:
return library[data.get('location', 'None')] return library[data.get('location', 'None')]
except KeyError: except KeyError:
return b64encode(json.dumps(data).encode()).decode('utf-8') return b64encode(json.dumps(data, separators=(',', ':')).encode()).decode('utf-8')
@classmethod @classmethod
def _empty(cls) -> ContextProperties: def _empty(cls) -> ContextProperties:

Loading…
Cancel
Save