Skip to content

Commit 4c7beab

Browse files
committed
Merge develop into 726-games
2 parents c9146a6 + 9bf5c34 commit 4c7beab

File tree

3 files changed

+66
-1
lines changed

3 files changed

+66
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
55

66
## [Unreleased]
77
### Added
8+
- `ChatAction` class to simplify chat action selection.
89
- Telegram Games platform!
910
### Changed
1011
- [:exclamation:][unreleased-bc-rename-constants] Rename and ensure no redefinition of constants: `BASE_PATH` -> `TB_BASE_PATH`, `BASE_COMMANDS_PATH` -> `TB_BASE_COMMANDS_PATH`.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ See the [*ImageCommand.php*][ImageCommand.php] for a full example.
371371
```php
372372
Request::sendChatAction([
373373
'chat_id' => $chat_id,
374-
'action' => 'typing',
374+
'action' => Longman\TelegramBot\ChatAction::TYPING,
375375
]);
376376
```
377377

src/ChatAction.php

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
/**
3+
* This file is part of the TelegramBot package.
4+
*
5+
* (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
11+
namespace Longman\TelegramBot;
12+
13+
class ChatAction
14+
{
15+
/**
16+
* Typing chat action
17+
*/
18+
const TYPING = 'typing';
19+
20+
/**
21+
* Upload Photo chat action
22+
*/
23+
const UPLOAD_PHOTO = 'upload_photo';
24+
25+
/**
26+
* Record Video chat action
27+
*/
28+
const RECORD_VIDEO = 'record_video';
29+
30+
/**
31+
* Upload Video chat action
32+
*/
33+
const UPLOAD_VIDEO = 'upload_video';
34+
35+
/**
36+
* Record Audio chat action
37+
*/
38+
const RECORD_AUDIO = 'record_audio';
39+
40+
/**
41+
* Upload Audio chat action
42+
*/
43+
const UPLOAD_AUDIO = 'upload_audio';
44+
45+
/**
46+
* Upload Document chat action
47+
*/
48+
const UPLOAD_DOCUMENT = 'upload_document';
49+
50+
/**
51+
* Find Location chat action
52+
*/
53+
const FIND_LOCATION = 'find_location';
54+
55+
/**
56+
* Record Video Note chat action
57+
*/
58+
const RECORD_VIDEO_NOTE = 'record_video_note';
59+
60+
/**
61+
* Upload Video note chat action
62+
*/
63+
const UPLOAD_VIDEO_NOTE = 'upload_video_note';
64+
}

0 commit comments

Comments
 (0)