Added methods \TgBotLib\Objects\Telegram\InlineKeyboardMarkup::removeRow
& \TgBotLib\Objects\Telegram\InlineKeyboardMarkup::addRow
to \TgBotLib\Objects\Telegram\InlineKeyboardMarkup
This commit is contained in:
parent
6a4128090c
commit
f8c02bceb3
2 changed files with 18 additions and 0 deletions
|
@ -25,6 +25,7 @@ This update accompanies the release of the [Telegram Bot API 6.7](https://core.t
|
||||||
`\TgBotLib\Objects\Telegram\InlineKeyboardButton::setCallbackGame`, `\TgBotLib\Objects\Telegram\InlineKeyboardButton::setPay`
|
`\TgBotLib\Objects\Telegram\InlineKeyboardButton::setCallbackGame`, `\TgBotLib\Objects\Telegram\InlineKeyboardButton::setPay`
|
||||||
to `\TgBotLib\Objects\Telegram\InlineKeyboardButton`
|
to `\TgBotLib\Objects\Telegram\InlineKeyboardButton`
|
||||||
* Added methods `\TgBotLib\Objects\Telegram\InlineKeyboardMarkup::removeRow` & `\TgBotLib\Objects\Telegram\InlineKeyboardMarkup::addRow` to `\TgBotLib\Objects\Telegram\InlineKeyboardMarkup`
|
* Added methods `\TgBotLib\Objects\Telegram\InlineKeyboardMarkup::removeRow` & `\TgBotLib\Objects\Telegram\InlineKeyboardMarkup::addRow` to `\TgBotLib\Objects\Telegram\InlineKeyboardMarkup`
|
||||||
|
* Added method `\TgBotLib\Objects\Telegram\WebAppInfo::setUrl` to `\TgBotLib\Objects\Telegram\WebAppInfo`
|
||||||
|
|
||||||
## [6.6.0] - 2023-04-10
|
## [6.6.0] - 2023-04-10
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
namespace TgBotLib\Objects\Telegram;
|
namespace TgBotLib\Objects\Telegram;
|
||||||
|
|
||||||
|
use InvalidArgumentException;
|
||||||
|
use TgBotLib\Classes\Validate;
|
||||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||||
|
|
||||||
class WebAppInfo implements ObjectTypeInterface
|
class WebAppInfo implements ObjectTypeInterface
|
||||||
|
@ -22,6 +24,21 @@
|
||||||
return $this->url;
|
return $this->url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps
|
||||||
|
*
|
||||||
|
* @param string $url
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function setUrl(string $url): self
|
||||||
|
{
|
||||||
|
if(!Validate::url($url))
|
||||||
|
throw new InvalidArgumentException('Invalid url format');
|
||||||
|
|
||||||
|
$this->url = $url;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array representation of the object.
|
* Returns an array representation of the object.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue