feat: Simple twitch component.

This commit is contained in:
2025-09-01 22:09:38 +10:00
parent 5fa0df66f5
commit 543a65b7fb
4 changed files with 99 additions and 0 deletions

View File

@@ -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)