Browse Source

Fix PartialConnection.url (#504)

also removed facebook connection URL since we talked about this before on how its URL render fails if fb connection name has spaces in it and how facebook assigns different UID than actual users UID for privacy reasons etc.
pull/10109/head
owocado 2 years ago
committed by GitHub
parent
commit
157366caab
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      discord/connections.py

4
discord/connections.py

@ -124,15 +124,13 @@ class PartialConnection:
if self.type == ConnectionType.twitch: if self.type == ConnectionType.twitch:
return f'https://www.twitch.tv/{self.name}' return f'https://www.twitch.tv/{self.name}'
elif self.type == ConnectionType.youtube: elif self.type == ConnectionType.youtube:
return f'https://www.youtube.com/{self.id}' return f'https://www.youtube.com/channel/{self.id}'
elif self.type == ConnectionType.skype: elif self.type == ConnectionType.skype:
return f'skype:{self.id}?userinfo' return f'skype:{self.id}?userinfo'
elif self.type == ConnectionType.steam: elif self.type == ConnectionType.steam:
return f'https://steamcommunity.com/profiles/{self.id}' return f'https://steamcommunity.com/profiles/{self.id}'
elif self.type == ConnectionType.reddit: elif self.type == ConnectionType.reddit:
return f'https://www.reddit.com/u/{self.name}' return f'https://www.reddit.com/u/{self.name}'
elif self.type == ConnectionType.facebook:
return f'https://www.facebook.com/{self.name}'
elif self.type == ConnectionType.twitter: elif self.type == ConnectionType.twitter:
return f'https://twitter.com/{self.name}' return f'https://twitter.com/{self.name}'
elif self.type == ConnectionType.spotify: elif self.type == ConnectionType.spotify:

Loading…
Cancel
Save