Pyrofork: Fix generate subcription invite link

This commit is contained in:
Yasir Aris M 2024-08-24 22:51:20 +07:00
parent d3ffd68690
commit efe3d90718
5 changed files with 61 additions and 43 deletions

View file

@ -2,10 +2,12 @@ id message
ABOUT_TOO_LONG The provided about/bio text is too long
ACCESS_TOKEN_EXPIRED The bot token has expired
ACCESS_TOKEN_INVALID The bot access token is invalid
ADDRESS_INVALID The specified geopoint address is invalid.
ADMINS_TOO_MUCH The chat has too many administrators
ADMIN_ID_INVALID The specified admin ID is invalid
ADMIN_RANK_EMOJI_NOT_ALLOWED Emoji are not allowed in custom administrator titles
ADMIN_RANK_INVALID The custom administrator title is invalid or too long
ADMIN_RIGHTS_EMPTY The chatAdminRights constructor passed in keyboardButtonRequestPeer.peer_type.user_admin_rights has no rights set (i.e. flags is 0).
ALBUM_PHOTOS_TOO_MANY Too many photos were included in the album
API_ID_INVALID The api_id/api_hash combination is invalid
API_ID_PUBLISHED_FLOOD You are using an API key that is limited on the server side because it was published somewhere
@ -23,6 +25,7 @@ AUTOARCHIVE_NOT_AVAILABLE This feature is not yet enabled for your account due t
BANK_CARD_NUMBER_INVALID The credit card number is invalid
BANNED_RIGHTS_INVALID You provided a set of restrictions that is invalid
BASE_PORT_LOC_INVALID The base port location is invalid
BIRTHDAY_INVALID The age should be less than 150 year old in Telegram
BOTS_TOO_MUCH The chat has too many bots
BOT_CHANNELS_NA Bots can't edit admin privileges
BOT_COMMAND_DESCRIPTION_INVALID The command description was empty, too long or had invalid characters
@ -44,6 +47,7 @@ BROADCAST_ID_INVALID The channel is invalid
BROADCAST_PUBLIC_VOTERS_FORBIDDEN Polls with public voters cannot be sent in channels
BROADCAST_REQUIRED The request can only be used with a channel
BUTTON_DATA_INVALID The button callback data is invalid or too large
BUTTON_ID_INVALID The button_id parameter is invalid
BUTTON_TEXT_INVALID The specified button text is invalid
BUTTON_TYPE_INVALID The type of one of the buttons you provided is invalid
BUTTON_URL_INVALID The button url is invalid
@ -58,13 +62,15 @@ CHANNELS_ADMIN_PUBLIC_TOO_MUCH You are an administrator of too many public chann
CHANNELS_TOO_MUCH You have joined too many channels or supergroups, leave some and try again
CHANNEL_ADD_INVALID Internal error.
CHANNEL_BANNED The channel is banned
CHANNEL_ID_INVALID The specified supergroup ID is invalid.
CHANNEL_INVALID The channel parameter is invalid
CHANNEL_PARICIPANT_MISSING The current user is not in the channel
CHANNEL_PRIVATE The channel/supergroup is not accessible
CHANNEL_TOO_BIG The channel too big
CHANNEL_TOO_LARGE The channel is too large
CHANNEL_TOO_LARGE "Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change)."
CHARGE_ALREADY_REFUNDED The charge id was already used for a refund.
CHARGE_NOT_FOUND The charge id was not found.
CHATLIST_EXCLUDE_INVALID The specified `exclude_peers` are invalid.
CHAT_ABOUT_NOT_MODIFIED The chat about text was not modified because you tried to edit it using the same content
CHAT_ABOUT_TOO_LONG The chat about text is too long
CHAT_ADMIN_REQUIRED The method requires chat admin privileges
@ -95,6 +101,7 @@ CONNECTION_SYSTEM_EMPTY The connection to the system is empty
CONNECTION_SYSTEM_LANG_CODE_EMPTY The system language code is empty
CONTACT_ADD_MISSING Contact to add is missing
CONTACT_ID_INVALID The provided contact id is invalid
CONTACT_MISSING The specified user is not a contact.
CONTACT_NAME_EMPTY The provided contact name is empty
CONTACT_REQ_MISSING Missing contact request
CREATE_CALL_FAILED An error occurred while creating the call
@ -109,10 +116,12 @@ DOCUMENT_INVALID The document is invalid
EMAIL_HASH_EXPIRED The email hash expired and cannot be used to verify it
EMAIL_INVALID The email provided is invalid
EMAIL_NOT_ALLOWED This email is not allowed
EMAIL_NOT_SETUP In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup.
EMAIL_UNCONFIRMED Email unconfirmed
EMAIL_UNCONFIRMED_X The provided email isn't confirmed, {value} is the length of the verification code that was just sent to the email
EMAIL_VERIFY_EXPIRED The verification email has expired
EMOJI_INVALID The specified theme emoji is valid
EMOJI_MARKUP_INVALID The specified `video_emoji_markup` was invalid.
EMOJI_NOT_MODIFIED The theme wasn't changed
EMOTICON_EMPTY The emoticon parameter is empty
EMOTICON_INVALID The emoticon parameter is invalid
@ -129,6 +138,9 @@ ERROR_TEXT_EMPTY The provided error message is empty
EXPIRE_DATE_INVALID The expiration date is invalid
EXPIRE_FORBIDDEN Expire forbidden
EXPORT_CARD_INVALID The provided card is invalid
EXTENDED_MEDIA_AMOUNT_INVALID The maximum amount of `star_count` should be less than the `stars_paid_post_amount_max`
EXTENDED_MEDIA_PEER_INVALID The specified chat type is invalid.
EXTENDED_MEDIA_TYPE_INVALID The specified extended media type is unsupported.
EXTERNAL_URL_INVALID The external media URL is invalid
FIELD_NAME_EMPTY The field with the name FIELD_NAME is missing
FIELD_NAME_INVALID The field with the name FIELD_NAME is invalid
@ -157,13 +169,16 @@ FIRSTNAME_INVALID The first name is invalid
FOLDER_ID_EMPTY The folder you tried to delete was already empty
FOLDER_ID_INVALID The folder id is invalid
FORM_ID_EXPIRED The specified id has expired.
FORUM_ENABLED You can't execute the specified action because the group is a [forum](https://core.telegram.org/api/forum), disable forum functionality to continue.
FRESH_CHANGE_ADMINS_FORBIDDEN You can't change administrator settings in this chat because your session was logged-in recently
FROM_MESSAGE_BOT_DISABLED Bots can't use fromMessage min constructors
FROM_PEER_INVALID The from peer value is invalid
GAME_BOT_INVALID You cannot send that game with the current bot
GENERAL_MODIFY_ICON_FORBIDDEN You can't modify the icon of the General topic.
GEO_POINT_INVALID Invalid geo point provided
GIF_CONTENT_TYPE_INVALID GIF content-type invalid
GIF_ID_INVALID The provided gif/animation id is invalid
GIFT_SLUG_INVALID The specified slug is invalid.
GIFT_SLUG_EXPIRED The gift slug is expired
GRAPH_EXPIRED_RELOAD This graph has expired, please obtain a new graph token
GRAPH_INVALID_RELOAD Invalid graph token provided, please reload the stats and provide the updated token
@ -190,7 +205,9 @@ INPUT_LAYER_INVALID The provided layer is invalid
INPUT_METHOD_INVALID The method invoked is invalid in the current schema
INPUT_REQUEST_TOO_LONG The input request is too long
INPUT_TEXT_EMPTY The specified text is empty
INPUT_TEXT_TOO_LONG The specified text is too long.
INPUT_USER_DEACTIVATED The target user has been deleted/deactivated
INVITES_TOO_MUCH The maximum number of per-folder invites specified by the `chatlist_invites_limit_default`/`chatlist_invites_limit_premium` was reached.
INVITE_FORBIDDEN_WITH_JOINAS If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID
INVITE_HASH_EMPTY The invite hash is empty
INVITE_HASH_EXPIRED The chat invite link is no longer valid
@ -241,6 +258,7 @@ MULTI_MEDIA_TOO_LONG The album/media group contains too many items
NEW_SALT_INVALID The new salt is invalid
NEW_SETTINGS_EMPTY No password is set on the current account, and no new password was specified in `new_settings`
NEW_SETTINGS_INVALID The new settings are invalid
NOGENERAL_HIDE_FORBIDDEN The hidden parameter is only valid for the General topic message_thread_id=1
NEXT_OFFSET_INVALID The next offset value is invalid
OFFSET_INVALID The offset parameter is invalid
OFFSET_PEER_ID_INVALID The provided offset peer is invalid
@ -301,6 +319,7 @@ POLL_QUESTION_INVALID The poll question is invalid
POLL_UNSUPPORTED This layer does not support polls in the invoked method
POLL_VOTE_REQUIRED Cast a vote in the poll before calling this method
PREMIUM_ACCOUNT_REQUIRED The method requires a premium user account
PREMIUM_GIFTCODE_WAS_REFUNDED This gift code can't be redeemed because the giveaway organizer requested a refund
PRIVACY_KEY_INVALID The privacy key is invalid
PRIVACY_TOO_LONG Your privacy exception list has exceeded the maximum capacity
PRIVACY_VALUE_INVALID The privacy value is invalid
@ -380,7 +399,13 @@ STICKER_THUMB_PNG_NOPNG A png sticker thumbnail file was expected, but something
STICKER_VIDEO_BIG The specified video sticker is too big
STICKER_VIDEO_NODOC You must send the video sticker as a document
STICKER_VIDEO_NOWEBM A webm video file was expected, but something else was provided
STORY_ID_EMPTY You specified no story IDs.
STORY_ID_INVALID The specified story ID is invalid.
STORY_NOT_MODIFIED The new story information you passed is equal to the previous story information, thus it wasn't modified.
STORY_PERIOD_INVALID The specified story period is invalid for this account.
STORIES_TOO_MUCH Too many stories in the current account
STORY_SEND_FLOOD_WEEKLY_X You've hit the weekly story limit, wait for the specified number of seconds before posting a new story.
STORY_SEND_FLOOD_MONTHLY_X You've hit the monthly story limit, wait for the specified number of seconds before posting a new story.
STORY_PERIOD_INVALID The story period is invalid
SWITCH_PM_TEXT_EMPTY The switch_pm.text field was empty
TAKEOUT_INVALID The takeout id is invalid
@ -398,8 +423,11 @@ TMP_PASSWORD_INVALID The temporary password is invalid
TOKEN_INVALID The provided token is invalid
TOPIC_CLOSED The topic was closed
TOPIC_DELETED The topic was deleted
TOPIC_CLOSE_SEPARATELY The close flag cannot be provided together with any of the other flags.
TOPIC_HIDE_SEPARATELY The hide flag cannot be provided together with any of the other flags.
TOPIC_ID_INVALID The provided topic ID is invalid
TOPIC_NOT_MODIFIED The topic was not modified
TOPIC_TITLE_EMPTY The specified topic title is empty.
TO_LANG_INVALID The specified destination language is invalid
TRANSCRIPTION_FAILED Telegram is having internal problems. Please try again later to transcribe the audio.
TTL_DAYS_INVALID The provided TTL days is invalid
@ -440,11 +468,12 @@ USER_VOLUME_INVALID The specified user volume is invalid
VIDEO_CONTENT_TYPE_INVALID The video content type is invalid (i.e.: not streamable)
VIDEO_FILE_INVALID The video file is invalid
VIDEO_TITLE_EMPTY The specified video title is empty
VOICE_MESSAGES_FORBIDDEN Voice messages are restricted
VOICE_MESSAGES_FORBIDDEN This user's privacy settings forbid you from sending voice messages
VOLUME_LOC_NOT_FOUND The volume location can't be found
WALLPAPER_FILE_INVALID The provided file cannot be used as a wallpaper
WALLPAPER_INVALID The input wallpaper was not valid
WALLPAPER_MIME_INVALID The wallpaper mime type is invalid
WALLPAPER_NOT_FOUND The specified wallpaper could not be found.
WC_CONVERT_URL_INVALID WC convert URL invalid
WEBDOCUMENT_INVALID The web document is invalid
WEBDOCUMENT_MIME_INVALID The web document mime type is invalid
@ -463,5 +492,7 @@ STORIES_NEVER_CREATED You have never created any stories
MEDIA_FILE_INVALID The provided media file is invalid
CHANNEL_FORUM_MISSING The channel forum is missing
TTL_PERIOD_INVALID The provided TTL period is invalid
BOOSTS_REQUIRED Channel required more boost to upload a story
BOOSTS_EMPTY Boosts empty
BOOSTS_REQUIRED The specified channel must first be boosted by its users in order to perform this action
BOOSTS_EMPTY You can't modify the icon of the General topic.
BOOST_NOT_MODIFIED You're already boosting the specified channel.
BOOST_PEER_INVALID The specified `boost_peer` is invalid.

1 id message
2 ABOUT_TOO_LONG The provided about/bio text is too long
3 ACCESS_TOKEN_EXPIRED The bot token has expired
4 ACCESS_TOKEN_INVALID The bot access token is invalid
5 ADDRESS_INVALID The specified geopoint address is invalid.
6 ADMINS_TOO_MUCH The chat has too many administrators
7 ADMIN_ID_INVALID The specified admin ID is invalid
8 ADMIN_RANK_EMOJI_NOT_ALLOWED Emoji are not allowed in custom administrator titles
9 ADMIN_RANK_INVALID The custom administrator title is invalid or too long
10 ADMIN_RIGHTS_EMPTY The chatAdminRights constructor passed in keyboardButtonRequestPeer.peer_type.user_admin_rights has no rights set (i.e. flags is 0).
11 ALBUM_PHOTOS_TOO_MANY Too many photos were included in the album
12 API_ID_INVALID The api_id/api_hash combination is invalid
13 API_ID_PUBLISHED_FLOOD You are using an API key that is limited on the server side because it was published somewhere
25 BANK_CARD_NUMBER_INVALID The credit card number is invalid
26 BANNED_RIGHTS_INVALID You provided a set of restrictions that is invalid
27 BASE_PORT_LOC_INVALID The base port location is invalid
28 BIRTHDAY_INVALID The age should be less than 150 year old in Telegram
29 BOTS_TOO_MUCH The chat has too many bots
30 BOT_CHANNELS_NA Bots can't edit admin privileges
31 BOT_COMMAND_DESCRIPTION_INVALID The command description was empty, too long or had invalid characters
47 BROADCAST_PUBLIC_VOTERS_FORBIDDEN Polls with public voters cannot be sent in channels
48 BROADCAST_REQUIRED The request can only be used with a channel
49 BUTTON_DATA_INVALID The button callback data is invalid or too large
50 BUTTON_ID_INVALID The button_id parameter is invalid
51 BUTTON_TEXT_INVALID The specified button text is invalid
52 BUTTON_TYPE_INVALID The type of one of the buttons you provided is invalid
53 BUTTON_URL_INVALID The button url is invalid
62 CHANNELS_TOO_MUCH You have joined too many channels or supergroups, leave some and try again
63 CHANNEL_ADD_INVALID Internal error.
64 CHANNEL_BANNED The channel is banned
65 CHANNEL_ID_INVALID The specified supergroup ID is invalid.
66 CHANNEL_INVALID The channel parameter is invalid
67 CHANNEL_PARICIPANT_MISSING The current user is not in the channel
68 CHANNEL_PRIVATE The channel/supergroup is not accessible
69 CHANNEL_TOO_BIG The channel too big
70 CHANNEL_TOO_LARGE The channel is too large Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change).
71 CHARGE_ALREADY_REFUNDED The charge id was already used for a refund.
72 CHARGE_NOT_FOUND The charge id was not found.
73 CHATLIST_EXCLUDE_INVALID The specified `exclude_peers` are invalid.
74 CHAT_ABOUT_NOT_MODIFIED The chat about text was not modified because you tried to edit it using the same content
75 CHAT_ABOUT_TOO_LONG The chat about text is too long
76 CHAT_ADMIN_REQUIRED The method requires chat admin privileges
101 CONNECTION_SYSTEM_LANG_CODE_EMPTY The system language code is empty
102 CONTACT_ADD_MISSING Contact to add is missing
103 CONTACT_ID_INVALID The provided contact id is invalid
104 CONTACT_MISSING The specified user is not a contact.
105 CONTACT_NAME_EMPTY The provided contact name is empty
106 CONTACT_REQ_MISSING Missing contact request
107 CREATE_CALL_FAILED An error occurred while creating the call
116 EMAIL_HASH_EXPIRED The email hash expired and cannot be used to verify it
117 EMAIL_INVALID The email provided is invalid
118 EMAIL_NOT_ALLOWED This email is not allowed
119 EMAIL_NOT_SETUP In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup.
120 EMAIL_UNCONFIRMED Email unconfirmed
121 EMAIL_UNCONFIRMED_X The provided email isn't confirmed, {value} is the length of the verification code that was just sent to the email
122 EMAIL_VERIFY_EXPIRED The verification email has expired
123 EMOJI_INVALID The specified theme emoji is valid
124 EMOJI_MARKUP_INVALID The specified `video_emoji_markup` was invalid.
125 EMOJI_NOT_MODIFIED The theme wasn't changed
126 EMOTICON_EMPTY The emoticon parameter is empty
127 EMOTICON_INVALID The emoticon parameter is invalid
138 EXPIRE_DATE_INVALID The expiration date is invalid
139 EXPIRE_FORBIDDEN Expire forbidden
140 EXPORT_CARD_INVALID The provided card is invalid
141 EXTENDED_MEDIA_AMOUNT_INVALID The maximum amount of `star_count` should be less than the `stars_paid_post_amount_max`
142 EXTENDED_MEDIA_PEER_INVALID The specified chat type is invalid.
143 EXTENDED_MEDIA_TYPE_INVALID The specified extended media type is unsupported.
144 EXTERNAL_URL_INVALID The external media URL is invalid
145 FIELD_NAME_EMPTY The field with the name FIELD_NAME is missing
146 FIELD_NAME_INVALID The field with the name FIELD_NAME is invalid
169 FOLDER_ID_EMPTY The folder you tried to delete was already empty
170 FOLDER_ID_INVALID The folder id is invalid
171 FORM_ID_EXPIRED The specified id has expired.
172 FORUM_ENABLED You can't execute the specified action because the group is a [forum](https://core.telegram.org/api/forum), disable forum functionality to continue.
173 FRESH_CHANGE_ADMINS_FORBIDDEN You can't change administrator settings in this chat because your session was logged-in recently
174 FROM_MESSAGE_BOT_DISABLED Bots can't use fromMessage min constructors
175 FROM_PEER_INVALID The from peer value is invalid
176 GAME_BOT_INVALID You cannot send that game with the current bot
177 GENERAL_MODIFY_ICON_FORBIDDEN You can't modify the icon of the General topic.
178 GEO_POINT_INVALID Invalid geo point provided
179 GIF_CONTENT_TYPE_INVALID GIF content-type invalid
180 GIF_ID_INVALID The provided gif/animation id is invalid
181 GIFT_SLUG_INVALID The specified slug is invalid.
182 GIFT_SLUG_EXPIRED The gift slug is expired
183 GRAPH_EXPIRED_RELOAD This graph has expired, please obtain a new graph token
184 GRAPH_INVALID_RELOAD Invalid graph token provided, please reload the stats and provide the updated token
205 INPUT_METHOD_INVALID The method invoked is invalid in the current schema
206 INPUT_REQUEST_TOO_LONG The input request is too long
207 INPUT_TEXT_EMPTY The specified text is empty
208 INPUT_TEXT_TOO_LONG The specified text is too long.
209 INPUT_USER_DEACTIVATED The target user has been deleted/deactivated
210 INVITES_TOO_MUCH The maximum number of per-folder invites specified by the `chatlist_invites_limit_default`/`chatlist_invites_limit_premium` was reached.
211 INVITE_FORBIDDEN_WITH_JOINAS If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID
212 INVITE_HASH_EMPTY The invite hash is empty
213 INVITE_HASH_EXPIRED The chat invite link is no longer valid
258 NEW_SALT_INVALID The new salt is invalid
259 NEW_SETTINGS_EMPTY No password is set on the current account, and no new password was specified in `new_settings`
260 NEW_SETTINGS_INVALID The new settings are invalid
261 NOGENERAL_HIDE_FORBIDDEN The hidden parameter is only valid for the General topic message_thread_id=1
262 NEXT_OFFSET_INVALID The next offset value is invalid
263 OFFSET_INVALID The offset parameter is invalid
264 OFFSET_PEER_ID_INVALID The provided offset peer is invalid
319 POLL_UNSUPPORTED This layer does not support polls in the invoked method
320 POLL_VOTE_REQUIRED Cast a vote in the poll before calling this method
321 PREMIUM_ACCOUNT_REQUIRED The method requires a premium user account
322 PREMIUM_GIFTCODE_WAS_REFUNDED This gift code can't be redeemed because the giveaway organizer requested a refund
323 PRIVACY_KEY_INVALID The privacy key is invalid
324 PRIVACY_TOO_LONG Your privacy exception list has exceeded the maximum capacity
325 PRIVACY_VALUE_INVALID The privacy value is invalid
399 STICKER_VIDEO_BIG The specified video sticker is too big
400 STICKER_VIDEO_NODOC You must send the video sticker as a document
401 STICKER_VIDEO_NOWEBM A webm video file was expected, but something else was provided
402 STORY_ID_EMPTY You specified no story IDs.
403 STORY_ID_INVALID The specified story ID is invalid.
404 STORY_NOT_MODIFIED The new story information you passed is equal to the previous story information, thus it wasn't modified.
405 STORY_PERIOD_INVALID The specified story period is invalid for this account.
406 STORIES_TOO_MUCH Too many stories in the current account
407 STORY_SEND_FLOOD_WEEKLY_X You've hit the weekly story limit, wait for the specified number of seconds before posting a new story.
408 STORY_SEND_FLOOD_MONTHLY_X You've hit the monthly story limit, wait for the specified number of seconds before posting a new story.
409 STORY_PERIOD_INVALID The story period is invalid
410 SWITCH_PM_TEXT_EMPTY The switch_pm.text field was empty
411 TAKEOUT_INVALID The takeout id is invalid
423 TOKEN_INVALID The provided token is invalid
424 TOPIC_CLOSED The topic was closed
425 TOPIC_DELETED The topic was deleted
426 TOPIC_CLOSE_SEPARATELY The close flag cannot be provided together with any of the other flags.
427 TOPIC_HIDE_SEPARATELY The hide flag cannot be provided together with any of the other flags.
428 TOPIC_ID_INVALID The provided topic ID is invalid
429 TOPIC_NOT_MODIFIED The topic was not modified
430 TOPIC_TITLE_EMPTY The specified topic title is empty.
431 TO_LANG_INVALID The specified destination language is invalid
432 TRANSCRIPTION_FAILED Telegram is having internal problems. Please try again later to transcribe the audio.
433 TTL_DAYS_INVALID The provided TTL days is invalid
468 VIDEO_CONTENT_TYPE_INVALID The video content type is invalid (i.e.: not streamable)
469 VIDEO_FILE_INVALID The video file is invalid
470 VIDEO_TITLE_EMPTY The specified video title is empty
471 VOICE_MESSAGES_FORBIDDEN Voice messages are restricted This user's privacy settings forbid you from sending voice messages
472 VOLUME_LOC_NOT_FOUND The volume location can't be found
473 WALLPAPER_FILE_INVALID The provided file cannot be used as a wallpaper
474 WALLPAPER_INVALID The input wallpaper was not valid
475 WALLPAPER_MIME_INVALID The wallpaper mime type is invalid
476 WALLPAPER_NOT_FOUND The specified wallpaper could not be found.
477 WC_CONVERT_URL_INVALID WC convert URL invalid
478 WEBDOCUMENT_INVALID The web document is invalid
479 WEBDOCUMENT_MIME_INVALID The web document mime type is invalid
492 MEDIA_FILE_INVALID The provided media file is invalid
493 CHANNEL_FORUM_MISSING The channel forum is missing
494 TTL_PERIOD_INVALID The provided TTL period is invalid
495 BOOSTS_REQUIRED Channel required more boost to upload a story The specified channel must first be boosted by its users in order to perform this action
496 BOOSTS_EMPTY Boosts empty You can't modify the icon of the General topic.
497 BOOST_NOT_MODIFIED You're already boosting the specified channel.
498 BOOST_PEER_INVALID The specified `boost_peer` is invalid.

View file

@ -14,9 +14,10 @@ PHONE_PASSWORD_FLOOD You have tried to log-in too many times
PREMIUM_CURRENTLY_UNAVAILABLE Premium currently unavailable
PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN Similar to a flood wait, must wait {value} minutes
SEND_CODE_UNAVAILABLE Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend)
PREMIUM_GIFTCODE_WAS_REFUNDED This gift code can't be redeemed because the giveaway organizer requested a refund
STICKERSET_INVALID The sticker set is invalid
STICKERSET_OWNER_ANONYMOUS This sticker set can't be used as the group's sticker set because it was created by one of its anonymous admins
UPDATE_APP_TO_LOGIN Update app to login
USERPIC_PRIVACY_REQUIRED You need to disable privacy settings for your profile picture in order to make your geolocation public
USERPIC_UPLOAD_REQUIRED You must have a profile picture to publish your geolocation
USER_RESTRICTED You are limited/restricted. You can't perform this action
USER_RESTRICTED You are limited/restricted. You can't perform this action

1 id message
14 PREMIUM_CURRENTLY_UNAVAILABLE Premium currently unavailable
15 PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN Similar to a flood wait, must wait {value} minutes
16 SEND_CODE_UNAVAILABLE Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend)
17 PREMIUM_GIFTCODE_WAS_REFUNDED This gift code can't be redeemed because the giveaway organizer requested a refund
18 STICKERSET_INVALID The sticker set is invalid
19 STICKERSET_OWNER_ANONYMOUS This sticker set can't be used as the group's sticker set because it was created by one of its anonymous admins
20 UPDATE_APP_TO_LOGIN Update app to login
21 USERPIC_PRIVACY_REQUIRED You need to disable privacy settings for your profile picture in order to make your geolocation public
22 USERPIC_UPLOAD_REQUIRED You must have a profile picture to publish your geolocation
23 USER_RESTRICTED You are limited/restricted. You can't perform this action

View file

@ -32,7 +32,9 @@ class CreateChatInviteLink:
name: str = None,
expire_date: datetime = None,
member_limit: int = None,
creates_join_request: bool = None
creates_join_request: bool = None,
subscription_period: int = None,
subscription_price: int = None
) -> "types.ChatInviteLink":
"""Create an additional invite link for a chat.
@ -64,6 +66,13 @@ class CreateChatInviteLink:
True, if users joining the chat via the link need to be approved by chat administrators.
If True, member_limit can't be specified.
subscription_period (``int``, *optional*):
Date when the subscription will expire.
for now, only 30 days is supported (30*24*60*60).
subscription_price (``int``, *optional*):
Subscription price (stars).
Returns:
:obj:`~pyrogram.types.ChatInviteLink`: On success, the new invite link is returned.
@ -75,6 +84,9 @@ class CreateChatInviteLink:
# Create a new link for up to 3 new users
link = await app.create_chat_invite_link(chat_id, member_limit=3)
# Create subcription link
link = await app.create_chat_invite_link(chat_id, subscription_period=60*24*60*60, subscription_price=1)
"""
r = await self.invoke(
raw.functions.messages.ExportChatInvite(
@ -82,7 +94,11 @@ class CreateChatInviteLink:
expire_date=utils.datetime_to_timestamp(expire_date),
usage_limit=member_limit,
title=name,
request_needed=creates_join_request
request_needed=creates_join_request,
subscription_pricing=raw.types.StarsSubscriptionPricing(
period=subscription_period,
amount=subscription_price
) if subscription_period and subscription_price is not None else None
)
)

View file

@ -22,15 +22,12 @@ from typing import Union
import pyrogram
from pyrogram import raw
from pyrogram import types
from pyrogram import utils
class ExportChatInviteLink:
async def export_chat_invite_link(
self: "pyrogram.Client",
chat_id: Union[int, str],
subscription_period: int = None,
subscription_price: int = None
chat_id: Union[int, str]
) -> "types.ChatInviteLink":
"""Generate a new primary invite link for a chat; any previously generated primary link is revoked.
@ -51,15 +48,8 @@ class ExportChatInviteLink:
(in the format @username).
You can also use chat public link in form of *t.me/<username>* (str).
subscription_period (``int``, *optional*):
Date when the subscription will expire.
for now, only 30 days is supported (30*24*60*60).
subscription_price (``int``, *optional*):
Subscription price (stars).
Returns:
:obj:`~pyrogram.types.ChatInviteLink`: On success, the invite link is returned.
``str``: On success, the new invite link as string is returned.
Example:
.. code-block:: python
@ -70,12 +60,8 @@ class ExportChatInviteLink:
r = await self.invoke(
raw.functions.messages.ExportChatInvite(
peer=await self.resolve_peer(chat_id),
legacy_revoke_permanent=True,
subscription_pricing=raw.types.StarsSubscriptionPricing(
period=subscription_period,
amount=subscription_price
)
legacy_revoke_permanent=True
)
)
return types.ChatInviteLink._parse(self, r)
return r.link

View file

@ -1071,11 +1071,7 @@ class Chat(Object):
return await self._client.leave_chat(self.id)
async def export_invite_link(
self,
subscription_period: int = None,
subscription_price: int = None
):
async def export_invite_link(self):
"""Bound method *export_invite_link* of :obj:`~pyrogram.types.Chat`.
Use as a shortcut for:
@ -1089,14 +1085,6 @@ class Chat(Object):
chat.export_invite_link()
Parameters:
subscription_period (``int``, *optional*):
Channel members only. Date when the subscription expires.
for now, only 30 days is supported (30*24*60*60).
subscription_price (``int``, *optional*):
Channel members only. Price of the subscription in the smallest units of the currency.
Returns:
``str``: On success, the exported invite link is returned.
@ -1104,11 +1092,7 @@ class Chat(Object):
ValueError: In case the chat_id belongs to a user.
"""
return await self._client.export_chat_invite_link(
self.id,
subscription_period=subscription_period,
subscription_price=subscription_price
)
return await self._client.export_chat_invite_link(self.id)
async def get_member(
self,