From 03cb8fd5e870b844080188d44fc53efee5ab27a6 Mon Sep 17 00:00:00 2001 From: teidesu <86301490+teidesu@users.noreply.github.com> Date: Fri, 2 Jul 2021 19:52:14 +0300 Subject: [PATCH] docs(client): updated docs for createStickerSet --- packages/client/src/client.ts | 14 +++++++++----- .../src/methods/stickers/create-sticker-set.ts | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/packages/client/src/client.ts b/packages/client/src/client.ts index 5a6c8f87..1726bdf3 100644 --- a/packages/client/src/client.ts +++ b/packages/client/src/client.ts @@ -2802,16 +2802,20 @@ export interface TelegramClient extends BaseTelegramClient { } ): Promise /** - * Create a new sticker set (only for bots) + * Create a new sticker set. * - * Only for bots. + * This is the only sticker-related method that + * users can use (they allowed it with the "import stickers" update) * * @param params * @returns Newly created sticker set */ createStickerSet(params: { /** - * Owner of the sticker set (must be user) + * Owner of the sticker set (must be user). + * + * If this pack is created from a user account, + * can only be `"self"` */ owner: InputPeerLike @@ -2824,8 +2828,8 @@ export interface TelegramClient extends BaseTelegramClient { * Short name of the sticker set. * Can only contain English letters, digits and underscores * (i.e. must match `/^[a-zA-Z0-9_]+$/), - * and must end with `_by_` (`` is - * case-insensitive). + * and (for bots) must end with `_by_` + * (`` is case-insensitive). */ shortName: string diff --git a/packages/client/src/methods/stickers/create-sticker-set.ts b/packages/client/src/methods/stickers/create-sticker-set.ts index aa7c6c5c..edc866b4 100644 --- a/packages/client/src/methods/stickers/create-sticker-set.ts +++ b/packages/client/src/methods/stickers/create-sticker-set.ts @@ -17,9 +17,10 @@ const MASK_POS = { } as const /** - * Create a new sticker set (only for bots) + * Create a new sticker set. * - * Only for bots. + * This is the only sticker-related method that + * users can use (they allowed it with the "import stickers" update) * * @param params * @returns Newly created sticker set @@ -29,7 +30,10 @@ export async function createStickerSet( this: TelegramClient, params: { /** - * Owner of the sticker set (must be user) + * Owner of the sticker set (must be user). + * + * If this pack is created from a user account, + * can only be `"self"` */ owner: InputPeerLike @@ -42,8 +46,8 @@ export async function createStickerSet( * Short name of the sticker set. * Can only contain English letters, digits and underscores * (i.e. must match `/^[a-zA-Z0-9_]+$/), - * and must end with `_by_` (`` is - * case-insensitive). + * and (for bots) must end with `_by_` + * (`` is case-insensitive). */ shortName: string