Class ProfileUser

A user profile, which contains their public information.

Implements

Constructors

  • Parameters

    • client: Client

      The main client.

    • data: {
          badges: {
              description: string;
              granted_at: Date;
              image_url: string;
              slug: string;
              title: string;
          }[];
          cashapp_username: null | string;
          created_at: Date;
          default_avatar_color_index: number;
          default_avatar_index: number;
          disable_gravatar: boolean;
          discord_username: null | string;
          display_name: string;
          email_gravatar_hash: string;
          github_username: null | string;
          maybe_moderator_fields: null | string;
          patreon_username: null | string;
          preferred_tts_result_visibility: "public" | "hidden";
          preferred_w2l_result_visibility: "public" | "hidden";
          profile_markdown: string;
          profile_rendered_html: string;
          twitch_username: null | string;
          twitter_username: null | string;
          user_role_slug: string;
          user_token: string;
          username: string;
          website_url: null | string;
      }

      The data that has arrived from the FakeYou API.

      • badges: {
            description: string;
            granted_at: Date;
            image_url: string;
            slug: string;
            title: string;
        }[]
      • cashapp_username: null | string
      • created_at: Date
      • default_avatar_color_index: number
      • default_avatar_index: number
      • disable_gravatar: boolean
      • discord_username: null | string
      • display_name: string
      • email_gravatar_hash: string
      • github_username: null | string
      • maybe_moderator_fields: null | string
      • patreon_username: null | string
      • preferred_tts_result_visibility: "public" | "hidden"
      • preferred_w2l_result_visibility: "public" | "hidden"
      • profile_markdown: string
      • profile_rendered_html: string
      • twitch_username: null | string
      • twitter_username: null | string
      • user_role_slug: string
      • user_token: string
      • username: string
      • website_url: null | string

    Returns ProfileUser

Properties

badges: Badge[]
bio: string
bioHtml: string
cashappUsername: null | string
client: Client
createdAt: Date
defaultAvatarColorIndex: number
defaultAvatarIndex: number
disableGravatar: boolean
discordUsername: null | string
displayName: string
emailGravatarHash: string
githubUsername: null | string
moderatorFields: null | string
patreonUsername: null | string
preferredTtsResultVisibility: string
preferredW2lResultVisibility: string
token: string
twitchUsername: null | string
twitterUsername: null | string
userRoleSlug: string
username: string
webUrl: string

The URL of the user's profile page.

websiteUrl: null | string

Methods

  • Edit the user profile. This will only edit the fields that you have privileges to edit. You need to be logged in to perform this action.

    Parameters

    • newValues: Partial<{
          cashapp_username: string;
          discord_username: string;
          github_username: string;
          preferred_tts_result_visibility: "public" | "hidden";
          preferred_w2l_result_visibility: "public" | "hidden";
          profile_markdown: string;
          twitch_username: string;
          twitter_username: string;
          website_url: string;
      }>

      The new values to set for the user profile. You do not need to include all values, it will only edit the values that you provide.

    Returns Promise<boolean>

    Whether the user profile was successfully edited.

  • Fetch a paginated list of the user's audio files. This includes TTS audio files only. 10 audio files are returned per page, and the results are sorted by newest first.

    Parameters

    • Optional cursor: string

      The cursor to use for pagination. If not provided, the first page will be fetched.

    Returns Promise<undefined | PaginatedUserAudioFiles>

    The user audio file. Undefined if the audio file could not be fetched.

  • Fetch the TTS models of the user profile. These are the models that the user has uploaded.

    Returns Promise<TtsModel[]>

    The TTS models of the user profile. Undefined if the models could not be fetched.

Generated using TypeDoc