feat: Simple twitch component.
This commit is contained in:
@@ -28,6 +28,7 @@ class ProfilesRegistry:
|
||||
return await UserProfile.fetch(link.profileid)
|
||||
|
||||
async def get_profile_twitch(self, userid: str) -> Optional[UserProfile]:
|
||||
userid = str(userid)
|
||||
link = await TwitchProfileLink.fetch(userid)
|
||||
if link:
|
||||
return await UserProfile.fetch(link.profileid)
|
||||
@@ -41,6 +42,7 @@ class ProfilesRegistry:
|
||||
return await Community.fetch(link.communityid)
|
||||
|
||||
async def get_community_twitch(self, channelid: str) -> Optional[Community]:
|
||||
channelid = str(channelid)
|
||||
link = await TwitchCommunityLink.fetch(channelid)
|
||||
if link:
|
||||
return await Community.fetch(link.communityid)
|
||||
|
||||
Reference in New Issue
Block a user