Skip to content

Commit

Permalink
ParseMode should be added to methods not to Types
Browse files Browse the repository at this point in the history
  • Loading branch information
TiiFuchs committed May 28, 2024
1 parent 24172a6 commit 2c71f74
Show file tree
Hide file tree
Showing 26 changed files with 115 additions and 133 deletions.
41 changes: 21 additions & 20 deletions src/Layers/Generated.php

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions src/Telegram/InlineQueryResultAudio.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

namespace Telepath\Telegram;

use Telepath\Support\ParseMode\ParseMode;

/**
* Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the audio.
*/
Expand All @@ -26,7 +24,7 @@ class InlineQueryResultAudio extends InlineQueryResult
public ?string $caption = null;

/** <em>Optional</em>. Mode for parsing entities in the audio caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
public ParseMode|string|null $parse_mode = null;
public ?string $parse_mode = null;

/**
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
Expand All @@ -49,7 +47,7 @@ class InlineQueryResultAudio extends InlineQueryResult
* @param string $audio_url A valid URL for the audio file
* @param string $title Title
* @param string $caption <em>Optional</em>. Caption, 0-1024 characters after entities parsing
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the audio caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the audio caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
* @param string $performer <em>Optional</em>. Performer
* @param int $audio_duration <em>Optional</em>. Audio duration in seconds
Expand All @@ -61,7 +59,7 @@ public static function make(
string $audio_url,
string $title,
?string $caption = null,
ParseMode|string|null $parse_mode = null,
?string $parse_mode = null,
?array $caption_entities = null,
?string $performer = null,
?int $audio_duration = null,
Expand Down
8 changes: 3 additions & 5 deletions src/Telegram/InlineQueryResultCachedAudio.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

namespace Telepath\Telegram;

use Telepath\Support\ParseMode\ParseMode;

/**
* Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the audio.
*/
Expand All @@ -23,7 +21,7 @@ class InlineQueryResultCachedAudio extends InlineQueryResult
public ?string $caption = null;

/** <em>Optional</em>. Mode for parsing entities in the audio caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
public ParseMode|string|null $parse_mode = null;
public ?string $parse_mode = null;

/**
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
Expand All @@ -39,7 +37,7 @@ class InlineQueryResultCachedAudio extends InlineQueryResult
* @param string $id Unique identifier for this result, 1-64 bytes
* @param string $audio_file_id A valid file identifier for the audio file
* @param string $caption <em>Optional</em>. Caption, 0-1024 characters after entities parsing
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the audio caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the audio caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
* @param InputMessageContent $input_message_content <em>Optional</em>. Content of the message to be sent instead of the audio
Expand All @@ -48,7 +46,7 @@ public static function make(
string $id,
string $audio_file_id,
?string $caption = null,
ParseMode|string|null $parse_mode = null,
?string $parse_mode = null,
?array $caption_entities = null,
?InlineKeyboardMarkup $reply_markup = null,
?InputMessageContent $input_message_content = null,
Expand Down
8 changes: 3 additions & 5 deletions src/Telegram/InlineQueryResultCachedDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

namespace Telepath\Telegram;

use Telepath\Support\ParseMode\ParseMode;

/**
* Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the file.
*/
Expand All @@ -29,7 +27,7 @@ class InlineQueryResultCachedDocument extends InlineQueryResult
public ?string $caption = null;

/** <em>Optional</em>. Mode for parsing entities in the document caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
public ParseMode|string|null $parse_mode = null;
public ?string $parse_mode = null;

/**
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
Expand All @@ -47,7 +45,7 @@ class InlineQueryResultCachedDocument extends InlineQueryResult
* @param string $document_file_id A valid file identifier for the file
* @param string $description <em>Optional</em>. Short description of the result
* @param string $caption <em>Optional</em>. Caption of the document to be sent, 0-1024 characters after entities parsing
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the document caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the document caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
* @param InputMessageContent $input_message_content <em>Optional</em>. Content of the message to be sent instead of the file
Expand All @@ -58,7 +56,7 @@ public static function make(
string $document_file_id,
?string $description = null,
?string $caption = null,
ParseMode|string|null $parse_mode = null,
?string $parse_mode = null,
?array $caption_entities = null,
?InlineKeyboardMarkup $reply_markup = null,
?InputMessageContent $input_message_content = null,
Expand Down
8 changes: 3 additions & 5 deletions src/Telegram/InlineQueryResultCachedGif.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

namespace Telepath\Telegram;

use Telepath\Support\ParseMode\ParseMode;

/**
* Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with specified content instead of the animation.
*/
Expand All @@ -26,7 +24,7 @@ class InlineQueryResultCachedGif extends InlineQueryResult
public ?string $caption = null;

/** <em>Optional</em>. Mode for parsing entities in the caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
public ParseMode|string|null $parse_mode = null;
public ?string $parse_mode = null;

/**
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
Expand All @@ -46,7 +44,7 @@ class InlineQueryResultCachedGif extends InlineQueryResult
* @param string $gif_file_id A valid file identifier for the GIF file
* @param string $title <em>Optional</em>. Title for the result
* @param string $caption <em>Optional</em>. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
* @param bool $show_caption_above_media <em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
Expand All @@ -57,7 +55,7 @@ public static function make(
string $gif_file_id,
?string $title = null,
?string $caption = null,
ParseMode|string|null $parse_mode = null,
?string $parse_mode = null,
?array $caption_entities = null,
?bool $show_caption_above_media = null,
?InlineKeyboardMarkup $reply_markup = null,
Expand Down
8 changes: 3 additions & 5 deletions src/Telegram/InlineQueryResultCachedMpeg4Gif.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

namespace Telepath\Telegram;

use Telepath\Support\ParseMode\ParseMode;

/**
* Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the animation.
*/
Expand All @@ -26,7 +24,7 @@ class InlineQueryResultCachedMpeg4Gif extends InlineQueryResult
public ?string $caption = null;

/** <em>Optional</em>. Mode for parsing entities in the caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
public ParseMode|string|null $parse_mode = null;
public ?string $parse_mode = null;

/**
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
Expand All @@ -46,7 +44,7 @@ class InlineQueryResultCachedMpeg4Gif extends InlineQueryResult
* @param string $mpeg4_file_id A valid file identifier for the MPEG4 file
* @param string $title <em>Optional</em>. Title for the result
* @param string $caption <em>Optional</em>. Caption of the MPEG-4 file to be sent, 0-1024 characters after entities parsing
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
* @param bool $show_caption_above_media <em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
Expand All @@ -57,7 +55,7 @@ public static function make(
string $mpeg4_file_id,
?string $title = null,
?string $caption = null,
ParseMode|string|null $parse_mode = null,
?string $parse_mode = null,
?array $caption_entities = null,
?bool $show_caption_above_media = null,
?InlineKeyboardMarkup $reply_markup = null,
Expand Down
8 changes: 3 additions & 5 deletions src/Telegram/InlineQueryResultCachedPhoto.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

namespace Telepath\Telegram;

use Telepath\Support\ParseMode\ParseMode;

/**
* Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the photo.
*/
Expand All @@ -29,7 +27,7 @@ class InlineQueryResultCachedPhoto extends InlineQueryResult
public ?string $caption = null;

/** <em>Optional</em>. Mode for parsing entities in the photo caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
public ParseMode|string|null $parse_mode = null;
public ?string $parse_mode = null;

/**
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
Expand All @@ -50,7 +48,7 @@ class InlineQueryResultCachedPhoto extends InlineQueryResult
* @param string $title <em>Optional</em>. Title for the result
* @param string $description <em>Optional</em>. Short description of the result
* @param string $caption <em>Optional</em>. Caption of the photo to be sent, 0-1024 characters after entities parsing
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the photo caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the photo caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
* @param bool $show_caption_above_media <em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
Expand All @@ -62,7 +60,7 @@ public static function make(
?string $title = null,
?string $description = null,
?string $caption = null,
ParseMode|string|null $parse_mode = null,
?string $parse_mode = null,
?array $caption_entities = null,
?bool $show_caption_above_media = null,
?InlineKeyboardMarkup $reply_markup = null,
Expand Down
8 changes: 3 additions & 5 deletions src/Telegram/InlineQueryResultCachedVideo.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

namespace Telepath\Telegram;

use Telepath\Support\ParseMode\ParseMode;

/**
* Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the video.
*/
Expand All @@ -29,7 +27,7 @@ class InlineQueryResultCachedVideo extends InlineQueryResult
public ?string $caption = null;

/** <em>Optional</em>. Mode for parsing entities in the video caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
public ParseMode|string|null $parse_mode = null;
public ?string $parse_mode = null;

/**
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
Expand All @@ -50,7 +48,7 @@ class InlineQueryResultCachedVideo extends InlineQueryResult
* @param string $title Title for the result
* @param string $description <em>Optional</em>. Short description of the result
* @param string $caption <em>Optional</em>. Caption of the video to be sent, 0-1024 characters after entities parsing
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the video caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the video caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
* @param bool $show_caption_above_media <em>Optional</em>. Pass <em>True</em>, if the caption must be shown above the message media
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
Expand All @@ -62,7 +60,7 @@ public static function make(
string $title,
?string $description = null,
?string $caption = null,
ParseMode|string|null $parse_mode = null,
?string $parse_mode = null,
?array $caption_entities = null,
?bool $show_caption_above_media = null,
?InlineKeyboardMarkup $reply_markup = null,
Expand Down
8 changes: 3 additions & 5 deletions src/Telegram/InlineQueryResultCachedVoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

namespace Telepath\Telegram;

use Telepath\Support\ParseMode\ParseMode;

/**
* Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use <em>input_message_content</em> to send a message with the specified content instead of the voice message.
*/
Expand All @@ -26,7 +24,7 @@ class InlineQueryResultCachedVoice extends InlineQueryResult
public ?string $caption = null;

/** <em>Optional</em>. Mode for parsing entities in the voice message caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details. */
public ParseMode|string|null $parse_mode = null;
public ?string $parse_mode = null;

/**
* <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
Expand All @@ -43,7 +41,7 @@ class InlineQueryResultCachedVoice extends InlineQueryResult
* @param string $voice_file_id A valid file identifier for the voice message
* @param string $title Voice message title
* @param string $caption <em>Optional</em>. Caption, 0-1024 characters after entities parsing
* @param ParseMode|string $parse_mode <em>Optional</em>. Mode for parsing entities in the voice message caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param string $parse_mode <em>Optional</em>. Mode for parsing entities in the voice message caption. See <a href="https://core.telegram.org/bots/api#formatting-options">formatting options</a> for more details.
* @param MessageEntity[] $caption_entities <em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em>
* @param InlineKeyboardMarkup $reply_markup <em>Optional</em>. <a href="https://core.telegram.org/bots/features#inline-keyboards">Inline keyboard</a> attached to the message
* @param InputMessageContent $input_message_content <em>Optional</em>. Content of the message to be sent instead of the voice message
Expand All @@ -53,7 +51,7 @@ public static function make(
string $voice_file_id,
string $title,
?string $caption = null,
ParseMode|string|null $parse_mode = null,
?string $parse_mode = null,
?array $caption_entities = null,
?InlineKeyboardMarkup $reply_markup = null,
?InputMessageContent $input_message_content = null,
Expand Down
Loading

0 comments on commit 2c71f74

Please sign in to comment.