mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-06 22:30:57 +00:00
4.20.38
* Fixed: Emotes not appearing in Chat on Videos. * Fixed: Extra, unnecessary `Pause Chat` section appearing in the Twitch chat settings menu. * Fixed: Hide the number of unread whispers when hiding the whispers button. * Fixed: The alternative live viewer display sometimes incorrectly displaying zero when loading the page. * Fixed: Precision issue when displaying localized numbers in some cases.
This commit is contained in:
parent
943e0fdc18
commit
472f9472ee
8 changed files with 93 additions and 14 deletions
|
@ -265,6 +265,29 @@ export default class TwitchData extends Module {
|
|||
return get('data.user', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Queries Apollo for the user's current game, details given the user id or name. One of (id, login) MUST be specified
|
||||
* @function getUserGame
|
||||
* @memberof TwitchData
|
||||
* @async
|
||||
*
|
||||
* @param {int|string|null|undefined} id - the user id number (can be an integer string)
|
||||
* @param {string|null|undefined} login - the username
|
||||
* @returns {Object} information about the requested user
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* console.log(this.twitch_data.getUserGame(19571641, null));
|
||||
*/
|
||||
async getUserGame(id, login) {
|
||||
const data = await this.queryApollo(
|
||||
await import(/* webpackChunkName: 'queries' */ './data/user-game.gql'),
|
||||
{ id, login }
|
||||
);
|
||||
|
||||
return get('data.user.broadcastSettings.game', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Queries Apollo for the logged in user's relationship to the channel with given the id or name. One of (id, login) MUST be specified
|
||||
* @function getUserSelf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue