Added methods \TgBotLib\Objects\Telegram\InlineKeyboardMarkup::removeRow & \TgBotLib\Objects\Telegram\InlineKeyboardMarkup::addRow to \TgBotLib\Objects\Telegram\InlineKeyboardMarkup

This commit is contained in:
Netkas 2023-04-23 17:33:26 -04:00
parent 6a4128090c
commit f8c02bceb3
2 changed files with 18 additions and 0 deletions

View file

@ -2,6 +2,8 @@
namespace TgBotLib\Objects\Telegram;
use InvalidArgumentException;
use TgBotLib\Classes\Validate;
use TgBotLib\Interfaces\ObjectTypeInterface;
class WebAppInfo implements ObjectTypeInterface
@ -22,6 +24,21 @@
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.
*