Browse Source

implement TikTok connection type (#416)

pull/10109/head
igna 3 years ago
committed by GitHub
parent
commit
11b9063c79
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      discord/connections.py
  2. 1
      discord/enums.py
  3. 1
      discord/types/user.py
  4. 4
      docs/api.rst

2
discord/connections.py

@ -135,6 +135,8 @@ class PartialConnection:
return f'https://account.xbox.com/en-US/Profile?Gamertag={self.name}'
elif self.type == ConnectionType.github:
return f'https://github.com/{self.name}'
elif self.type == ConnectionType.tiktok:
return f'https://tiktok.com/@{self.name}'
class Connection(PartialConnection):

1
discord/enums.py

@ -898,6 +898,7 @@ class ConnectionType(Enum):
spotify = 'spotify'
skype = 'skype'
steam = 'steam'
tiktok = 'tiktok'
twitch = 'twitch'
twitter = 'twitter'
youtube = 'youtube'

1
discord/types/user.py

@ -52,6 +52,7 @@ ConnectionType = Literal[
'spotify',
'skype',
'steam',
'tiktok',
'twitch',
'twitter',
'youtube',

4
docs/api.rst

@ -3255,6 +3255,10 @@ of :class:`enum.Enum`.
.. attribute:: steam
The user has a Steam connection.
.. attribute:: tiktok
The user has a TikTok connection.
.. attribute:: twitch

Loading…
Cancel
Save