Skip to content

Commit

Permalink
Add Bot API 5.3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Stajor committed Jun 26, 2021
1 parent 5f8db31 commit d5c7646
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
* @method Message sendAnimation(array $params)
* @method bool setMyCommands(array $params)
* @method BotCommand[] getMyCommands()
* @method bool deleteMyCommands(array $params)
* @method Message sendSticker(array $params)
* @method StickerSet getStickerSet(array $params)
* @method File uploadStickerFile(array $params)
Expand Down Expand Up @@ -164,6 +165,7 @@ class Api {
'sendAnimation' => ['return' => Message::class],
'setMyCommands' => [],
'getMyCommands' => ['return' => BotCommand::class, 'array' => true],
'deleteMyCommands' => [],
'sendSticker' => ['return' => Message::class],
'getStickerSet' => ['return' => StickerSet::class],
'uploadStickerFile' => ['return' => File::class],
Expand Down
7 changes: 7 additions & 0 deletions src/Types/BotCommandScopeAllChatAdministrators.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php namespace Telegram\Bot\Types;

use Telegram\Bot\Type;

class BotCommandScopeAllChatAdministrators extends Type {
public string $type;
}
7 changes: 7 additions & 0 deletions src/Types/BotCommandScopeAllGroupChats.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php namespace Telegram\Bot\Types;

use Telegram\Bot\Type;

class BotCommandScopeAllGroupChats extends Type {
public string $type;
}
7 changes: 7 additions & 0 deletions src/Types/BotCommandScopeAllPrivateChats.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php namespace Telegram\Bot\Types;

use Telegram\Bot\Type;

class BotCommandScopeAllPrivateChats extends Type {
public string $type;
}
8 changes: 8 additions & 0 deletions src/Types/BotCommandScopeChat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php namespace Telegram\Bot\Types;

use Telegram\Bot\Type;

class BotCommandScopeChat extends Type {
public string $type;
public string $chat_id;
}
8 changes: 8 additions & 0 deletions src/Types/BotCommandScopeChatAdministrators.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php namespace Telegram\Bot\Types;

use Telegram\Bot\Type;

class BotCommandScopeChatAdministrators extends Type {
public string $type;
public string $chat_id;
}
9 changes: 9 additions & 0 deletions src/Types/BotCommandScopeChatMember.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php namespace Telegram\Bot\Types;

use Telegram\Bot\Type;

class BotCommandScopeChatMember extends Type {
public string $type;
public string $chat_id;
public string $user_id;
}
7 changes: 7 additions & 0 deletions src/Types/BotCommandScopeDefault.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php namespace Telegram\Bot\Types;

use Telegram\Bot\Type;

class BotCommandScopeDefault extends Type {
public string $type;
}

0 comments on commit d5c7646

Please sign in to comment.