Skip to content

Commit 8d15a8b

Browse files
committed
fix: set correct type for remaining parse_mode fields
1 parent ea82a30 commit 8d15a8b

2 files changed

Lines changed: 81 additions & 4 deletions

File tree

scripts/generate.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2854,6 +2854,10 @@ export const OVERRIDES: OverridesConfig = {
28542854
hash: 'a20617eb',
28552855
type: T_str('video'),
28562856
},
2857+
parse_mode: {
2858+
hash: 'ce4a5c59',
2859+
type: T_parseMode(),
2860+
},
28572861
},
28582862
},
28592863
InlineQueryResultCachedVoice: {
@@ -2863,6 +2867,10 @@ export const OVERRIDES: OverridesConfig = {
28632867
hash: '4ef371e9',
28642868
type: T_str('voice'),
28652869
},
2870+
parse_mode: {
2871+
hash: '6b17bc28',
2872+
type: T_parseMode(),
2873+
},
28662874
},
28672875
},
28682876
InlineQueryResultCachedAudio: {
@@ -2872,6 +2880,10 @@ export const OVERRIDES: OverridesConfig = {
28722880
hash: '7ff6bc34',
28732881
type: T_str('audio'),
28742882
},
2883+
parse_mode: {
2884+
hash: 'ae8e638c',
2885+
type: T_parseMode(),
2886+
},
28752887
},
28762888
},
28772889
RefundedPayment: {
@@ -3192,6 +3204,15 @@ export const OVERRIDES: OverridesConfig = {
31923204
},
31933205
},
31943206
},
3207+
InputTextMessageContent: {
3208+
hash: '',
3209+
fields: {
3210+
parse_mode: {
3211+
hash: '91a6e03f',
3212+
type: T_parseMode(),
3213+
},
3214+
},
3215+
},
31953216
InputInvoiceMessageContent: {
31963217
hash: '51eae12e',
31973218
fields: {

src/types.gen.ts

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16473,7 +16473,21 @@ const InlineQueryResultCachedVideo = t({
1647316473
{
1647416474
name: 'parse_mode',
1647516475
type: {
16476-
type: 'str',
16476+
type: 'union',
16477+
types: [
16478+
{
16479+
type: 'str',
16480+
literal: 'HTML',
16481+
},
16482+
{
16483+
type: 'str',
16484+
literal: 'MarkdownV2',
16485+
},
16486+
{
16487+
type: 'str',
16488+
literal: 'Markdown',
16489+
},
16490+
],
1647716491
},
1647816492
description: {
1647916493
markdown: 'Mode for parsing entities in the video caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details.',
@@ -16589,7 +16603,21 @@ const InlineQueryResultCachedVoice = t({
1658916603
{
1659016604
name: 'parse_mode',
1659116605
type: {
16592-
type: 'str',
16606+
type: 'union',
16607+
types: [
16608+
{
16609+
type: 'str',
16610+
literal: 'HTML',
16611+
},
16612+
{
16613+
type: 'str',
16614+
literal: 'MarkdownV2',
16615+
},
16616+
{
16617+
type: 'str',
16618+
literal: 'Markdown',
16619+
},
16620+
],
1659316621
},
1659416622
description: {
1659516623
markdown: 'Mode for parsing entities in the voice message caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details.',
@@ -16685,7 +16713,21 @@ const InlineQueryResultCachedAudio = t({
1668516713
{
1668616714
name: 'parse_mode',
1668716715
type: {
16688-
type: 'str',
16716+
type: 'union',
16717+
types: [
16718+
{
16719+
type: 'str',
16720+
literal: 'HTML',
16721+
},
16722+
{
16723+
type: 'str',
16724+
literal: 'MarkdownV2',
16725+
},
16726+
{
16727+
type: 'str',
16728+
literal: 'Markdown',
16729+
},
16730+
],
1668916731
},
1669016732
description: {
1669116733
markdown: 'Mode for parsing entities in the audio caption. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details.',
@@ -16779,7 +16821,21 @@ const InputTextMessageContent = t({
1677916821
{
1678016822
name: 'parse_mode',
1678116823
type: {
16782-
type: 'str',
16824+
type: 'union',
16825+
types: [
16826+
{
16827+
type: 'str',
16828+
literal: 'HTML',
16829+
},
16830+
{
16831+
type: 'str',
16832+
literal: 'MarkdownV2',
16833+
},
16834+
{
16835+
type: 'str',
16836+
literal: 'Markdown',
16837+
},
16838+
],
1678316839
},
1678416840
description: {
1678516841
markdown: 'Mode for parsing entities in the message text. See [formatting options](https://core.telegram.org/bots/api#formatting-options) for more details.',

0 commit comments

Comments
 (0)