Available methods

getUserProfilePhotos()

Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.

parameters

parametertyperequireddescription
user_idnumberrequiredUnique identifier of the target user
offsetnumberoptionalSequential number of the first photo to be returned. By default, all photos are returned.
limitnumberoptionalLimits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.

returns

UserProfilePhotos

usage in yaebal

not (yet) hard-typed on Api — call it through the generic .call<T>() escape hatch documented in @yaebal/types.

bot.ts
import type { GetUserProfilePhotosParams, UserProfilePhotos } from "@yaebal/types";

await bot.api.call<UserProfilePhotos>("getUserProfilePhotos", {
  user_id: 123456789,
} satisfies GetUserProfilePhotosParams);

context shortcut

also available as ctx.getUserProfilePhotos() on 16 context types — see @yaebal/contexts.

context shortcut
/** Use this method to get a list of profile pictures for a user. Returns a [UserProfilePhotos](https://core.telegram.org/bots/api/#userprofilephotos) object. */
ctx.getUserProfilePhotos(params: Omit<GetUserProfilePhotosParams, "user_id">)