@@ 17-68 (lines=52) @@ | ||
14 | use Teebot\Api\Traits\File; |
|
15 | use Teebot\Api\Entity\InputFile; |
|
16 | ||
17 | class SendSticker extends AbstractMethod |
|
18 | { |
|
19 | use File; |
|
20 | ||
21 | const NAME = 'sendSticker'; |
|
22 | ||
23 | const RETURN_ENTITY = Message::class; |
|
24 | ||
25 | protected $chat_id; |
|
26 | ||
27 | protected $sticker; |
|
28 | ||
29 | protected $caption; |
|
30 | ||
31 | protected $disable_notification; |
|
32 | ||
33 | protected $reply_to_message_id; |
|
34 | ||
35 | protected $reply_markup; |
|
36 | ||
37 | protected $supportedProperties = [ |
|
38 | 'chat_id' => true, |
|
39 | 'sticker' => true, |
|
40 | 'caption' => false, |
|
41 | 'disable_notification' => false, |
|
42 | 'reply_to_message_id' => false, |
|
43 | 'reply_markup' => false |
|
44 | ]; |
|
45 | ||
46 | /** |
|
47 | * @return mixed |
|
48 | */ |
|
49 | public function getSticker() |
|
50 | { |
|
51 | return $this->sticker; |
|
52 | } |
|
53 | ||
54 | /** |
|
55 | * @param mixed $sticker |
|
56 | * |
|
57 | * @return $this |
|
58 | */ |
|
59 | public function setSticker($sticker) |
|
60 | { |
|
61 | $this->sticker = $this->initInputFile($sticker); |
|
62 | ||
63 | return $this; |
|
64 | ||
65 | } |
|
66 | ||
67 | ||
68 | } |
|
69 |
@@ 17-65 (lines=49) @@ | ||
14 | use Teebot\Api\Traits\File; |
|
15 | use Teebot\Api\Entity\InputFile; |
|
16 | ||
17 | class SendVoice extends AbstractMethod |
|
18 | { |
|
19 | use File; |
|
20 | ||
21 | const NAME = 'sendVoice'; |
|
22 | ||
23 | const RETURN_ENTITY = Message::class; |
|
24 | ||
25 | protected $chat_id; |
|
26 | ||
27 | protected $voice; |
|
28 | ||
29 | protected $duration; |
|
30 | ||
31 | protected $disable_notification; |
|
32 | ||
33 | protected $reply_to_message_id; |
|
34 | ||
35 | protected $reply_markup; |
|
36 | ||
37 | protected $supportedProperties = [ |
|
38 | 'chat_id' => true, |
|
39 | 'voice' => true, |
|
40 | 'duration' => false, |
|
41 | 'disable_notification' => false, |
|
42 | 'reply_to_message_id' => false, |
|
43 | 'reply_markup' => false |
|
44 | ]; |
|
45 | ||
46 | /** |
|
47 | * @return \CURLFile|string |
|
48 | */ |
|
49 | public function getVoice() |
|
50 | { |
|
51 | return $this->voice; |
|
52 | } |
|
53 | ||
54 | /** |
|
55 | * @param string $voice |
|
56 | * |
|
57 | * @return $this |
|
58 | */ |
|
59 | public function setVoice($voice) |
|
60 | { |
|
61 | $this->voice = $this->initInputFile($voice); |
|
62 | ||
63 | return $this; |
|
64 | } |
|
65 | } |
|
66 |