Skip to content

Commit 1f056a1

Browse files
committed
Add some errors to known errors
KurimuzonAkuma/kurigram@4fdf997
1 parent 1e5d325 commit 1f056a1

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

compiler/errors/sort.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@
7171
g = d.get("descriptions")
7272
l = g.get(k)
7373
m = k.replace("_%d", "_X")
74+
if "_X" in m:
75+
l = l.replace("for the specified number of", "{value}")
7476
l = l.replace("%d", "{value}")
7577
l = l.replace("\"", "'")
7678
l = l.replace("»", "»")

compiler/errors/source/400_BAD_REQUEST.tsv

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,14 @@ STARGIFT_INVALID The passed [inputInvoiceStarGift](https://core.telegram.org/con
459459
STARGIFT_MESSAGE_INVALID The provided message for this gift is invalid.
460460
STARGIFT_NOT_FOUND The specified star gift was not found.
461461
STARGIFT_NOT_OWNER You cannot control this gift because it does not belong to you.
462+
STARGIFT_OWNER_INVALID The specified gift owner is invalid.
462463
STARGIFT_RESELL_NOT_ALLOWED You cannot buy this gift. Someone else may have already bought it.
463464
STARGIFT_RESELL_TOO_EARLY_X A wait of {value} seconds is required to resell this gift.
464465
STARGIFT_SLUG_INVALID The provided star gift slug is invalid.
466+
STARGIFT_TRANSFER_TOO_EARLY_X A wait of {value} seconds is required to transfer this gift.
465467
STARGIFT_USAGE_LIMITED The gift is sold out.
466468
STARREF_AWAITING_END The previous referral program was terminated less than 24 hours ago: further changes can be made after the date specified in userFull.starref_program.end_date.
469+
STARREF_EXPIRED The specified referral link is expired.
467470
STARREF_HASH_REVOKED The specified affiliate link was already revoked.
468471
STARREF_MONTHS_TOO_LOW The ``duration_months`` parameter must be between 0 and 36
469472
STARREF_PERMILLE_INVALID The specified commission_permille is invalid: the minimum and maximum values for this parameter are contained in the [starref_min_commission_permille](https://core.telegram.org/api/config#starref-min-commission-permille) and [starref_max_commission_permille](https://core.telegram.org/api/config#starref-max-commission-permille) client configuration parameters.
@@ -502,8 +505,8 @@ STORY_ID_EMPTY You specified no story IDs.
502505
STORY_ID_INVALID The specified story ID is invalid.
503506
STORY_NOT_MODIFIED The new story information you passed is equal to the previous story information, thus it wasn't modified.
504507
STORY_PERIOD_INVALID The specified story period is invalid for this account.
505-
STORY_SEND_FLOOD_MONTHLY_X You've hit the monthly story limit as specified by the [`stories_sent_monthly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-monthly-limit-default): wait for the specified number of seconds before posting a new story.
506-
STORY_SEND_FLOOD_WEEKLY_X You've hit the weekly story limit as specified by the [`stories_sent_weekly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-weekly-limit-default): wait for the specified number of seconds before posting a new story.
508+
STORY_SEND_FLOOD_MONTHLY_X You've hit the monthly story limit as specified by the [`stories_sent_monthly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-monthly-limit-default): wait {value} seconds before posting a new story.
509+
STORY_SEND_FLOOD_WEEKLY_X You've hit the weekly story limit as specified by the [`stories_sent_weekly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-weekly-limit-default): wait {value} seconds before posting a new story.
507510
SUBSCRIPTION_EXPORT_MISSING You cannot send a [bot subscription invoice](https://core.telegram.org/api/subscriptions#bot-subscriptions) directly, you may only create invoice links using [payments.exportInvoice](https://core.telegram.org/method/payments.exportInvoice).
508511
SUBSCRIPTION_PERIOD_INVALID The specified subscription_pricing.period is invalid.
509512
SWITCH_PM_TEXT_EMPTY The switch_pm.text field was empty.

compiler/errors/source/406_NOT_ACCEPTABLE.tsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ PREMIUM_CURRENTLY_UNAVAILABLE You cannot currently purchase a Premium subscripti
1919
PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN Import for this chat is already in progress, wait {value} minutes before starting a new one.
2020
PRIVACY_PREMIUM_REQUIRED You need a [Telegram Premium subscription](https://core.telegram.org/api/premium) to send a message to this user.
2121
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).
22+
STARGIFT_EXPORT_IN_PROGRESS Gift export in progress.
2223
STICKERSET_INVALID The provided sticker set is invalid.
2324
STICKERSET_OWNER_ANONYMOUS Provided stickerset can't be installed as group stickerset to prevent admin deanonymization.
2425
TOPIC_CLOSED This topic was closed, you can't send messages to it anymore.

0 commit comments

Comments
 (0)