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

getUserProfilePhotos is directly typed on Api — call it straight off bot.api.

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

await bot.api.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"> & { user_id?: number })