TwurpleAuthenticationGetting dataExamplesFAQMigration

extractUserId

Definition

extractUserId(user)

Extracts the user ID from an argument that is possibly an object containing that ID.

ParameterTypeRequiredDefaultDescription
user
UserIdResolvable

A user ID or a user or channel object.

This is not a user name. Please use HelixUserApi#getUserByName to fetch a user object by name.

Aliased type: string | number | UserIdResolvableType

none

The user ID or object.

Return type: string