Skip to content

Commit

Permalink
Fixed non-optional fixed values
Browse files Browse the repository at this point in the history
  • Loading branch information
TiiFuchs committed May 29, 2022
1 parent adb3c9a commit b3c7e16
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
11 changes: 3 additions & 8 deletions src/Telegram/ForceReply.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class ForceReply extends Type
{
/** Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply' */
public bool $force_reply;
public bool $force_reply = true;

/** Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters */
public ?string $input_field_placeholder = null;
Expand All @@ -23,17 +23,12 @@ class ForceReply extends Type
public ?bool $selective = null;

/**
* @param bool $force_reply Shows reply interface to the user, as if they manually selected the bot's message and tapped 'Reply'
* @param string $input_field_placeholder Optional. The placeholder to be shown in the input field when the reply is active; 1-64 characters
* @param bool $selective Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
*/
public static function make(
bool $force_reply,
?string $input_field_placeholder = null,
?bool $selective = null
): static {
public static function make(?string $input_field_placeholder = null, ?bool $selective = null): static
{
return new static([
'force_reply' => $force_reply,
'input_field_placeholder' => $input_field_placeholder,
'selective' => $selective,
]);
Expand Down
6 changes: 2 additions & 4 deletions src/Telegram/ReplyKeyboardRemove.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,17 @@
class ReplyKeyboardRemove extends Type
{
/** Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup) */
public bool $remove_keyboard;
public bool $remove_keyboard = true;

/** Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet. */
public ?bool $selective = null;

/**
* @param bool $remove_keyboard Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)
* @param bool $selective Optional. Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.
*/
public static function make(bool $remove_keyboard, ?bool $selective = null): static
public static function make(?bool $selective = null): static
{
return new static([
'remove_keyboard' => $remove_keyboard,
'selective' => $selective,
]);
}
Expand Down
Binary file modified telepathy
Binary file not shown.

0 comments on commit b3c7e16

Please sign in to comment.