Appearance
Class: TeamsService
Read the current channel's Kappapps teams via kapp.teams, in apps and widgets.
Implements
Constructors
Constructor
ts
new TeamsService(): TeamsService;Returns
TeamsService
Methods
get()
ts
get(): Promise<Team[]>;Fetches the teams the current channel belongs to, sorted by name then ID. Pending invitations are excluded. Returns an empty list when there are no memberships.
Returns
Promise<Team[]>
Remarks
Apps require teams:read, including old manifest versions. Widgets do not declare scopes. Every call refreshes the list from the server; use Team.getChannels to read the members. These are Kappapps teams, not Twitch teams.
Example
ts
const teams = await kapp.teams.get();
for (const team of teams) {
const channels = await team.getChannels();
const liveChannels = channels.filter(channel => channel.stream !== null);
}