@@ 8-72 (lines=65) @@ | ||
5 | use TelegramBot\Api\BaseType; |
|
6 | use TelegramBot\Api\TypeInterface; |
|
7 | ||
8 | class BotCommand extends BaseType implements TypeInterface |
|
9 | { |
|
10 | /** |
|
11 | * {@inheritdoc} |
|
12 | * |
|
13 | * @var array |
|
14 | */ |
|
15 | static protected $requiredParams = ['command', 'description']; |
|
16 | ||
17 | /** |
|
18 | * {@inheritdoc} |
|
19 | * |
|
20 | * @var array |
|
21 | */ |
|
22 | static protected $map = [ |
|
23 | 'command' => true, |
|
24 | 'description' => true, |
|
25 | ]; |
|
26 | ||
27 | /** |
|
28 | * Text of the command, 1-32 characters. Can contain only lowercase English letters, digits and underscores. |
|
29 | * |
|
30 | * @var string |
|
31 | */ |
|
32 | protected $command; |
|
33 | ||
34 | /** |
|
35 | * Description of the command, 3-256 characters. |
|
36 | * |
|
37 | * @var string |
|
38 | */ |
|
39 | protected $description; |
|
40 | ||
41 | /** |
|
42 | * @return string |
|
43 | */ |
|
44 | public function getCommand() |
|
45 | { |
|
46 | return $this->command; |
|
47 | } |
|
48 | ||
49 | /** |
|
50 | * @param string $command |
|
51 | */ |
|
52 | public function setCommand($command) |
|
53 | { |
|
54 | $this->command = $command; |
|
55 | } |
|
56 | ||
57 | /** |
|
58 | * @return string |
|
59 | */ |
|
60 | public function getDescription() |
|
61 | { |
|
62 | return $this->description; |
|
63 | } |
|
64 | ||
65 | /** |
|
66 | * @param string $description |
|
67 | */ |
|
68 | public function setDescription($description) |
|
69 | { |
|
70 | $this->description = $description; |
|
71 | } |
|
72 | } |
|
73 |
@@ 8-72 (lines=65) @@ | ||
5 | use TelegramBot\Api\BaseType; |
|
6 | use TelegramBot\Api\TypeInterface; |
|
7 | ||
8 | class ChatLocation extends BaseType implements TypeInterface |
|
9 | { |
|
10 | /** |
|
11 | * {@inheritdoc} |
|
12 | * |
|
13 | * @var array |
|
14 | */ |
|
15 | static protected $requiredParams = ['location', 'address']; |
|
16 | ||
17 | /** |
|
18 | * {@inheritdoc} |
|
19 | * |
|
20 | * @var array |
|
21 | */ |
|
22 | static protected $map = [ |
|
23 | 'location' => Location::class, |
|
24 | 'address' => true, |
|
25 | ]; |
|
26 | ||
27 | /** |
|
28 | * The location to which the supergroup is connected. Can't be a live location. |
|
29 | * |
|
30 | * @var Location |
|
31 | */ |
|
32 | protected $location; |
|
33 | ||
34 | /** |
|
35 | * Location address; 1-64 characters, as defined by the chat owner |
|
36 | * |
|
37 | * @var string |
|
38 | */ |
|
39 | protected $address; |
|
40 | ||
41 | /** |
|
42 | * @return Location |
|
43 | */ |
|
44 | public function getLocation() |
|
45 | { |
|
46 | return $this->location; |
|
47 | } |
|
48 | ||
49 | /** |
|
50 | * @param Location $location |
|
51 | */ |
|
52 | public function setLocation($location) |
|
53 | { |
|
54 | $this->location = $location; |
|
55 | } |
|
56 | ||
57 | /** |
|
58 | * @return string |
|
59 | */ |
|
60 | public function getAddress() |
|
61 | { |
|
62 | return $this->address; |
|
63 | } |
|
64 | ||
65 | /** |
|
66 | * @param string $address |
|
67 | */ |
|
68 | public function setAddress($address) |
|
69 | { |
|
70 | $this->address = $address; |
|
71 | } |
|
72 | } |
|
73 |
@@ 12-76 (lines=65) @@ | ||
9 | * Class Dice |
|
10 | * This object represents an animated emoji that displays a random value. |
|
11 | */ |
|
12 | class Dice extends BaseType implements TypeInterface |
|
13 | { |
|
14 | /** |
|
15 | * {@inheritdoc} |
|
16 | * |
|
17 | * @var array |
|
18 | */ |
|
19 | static protected $requiredParams = ['emoji', 'value']; |
|
20 | ||
21 | /** |
|
22 | * {@inheritdoc} |
|
23 | * |
|
24 | * @var array |
|
25 | */ |
|
26 | static protected $map = [ |
|
27 | 'emoji' => true, |
|
28 | 'value' => true |
|
29 | ]; |
|
30 | ||
31 | /** |
|
32 | * Emoji on which the dice throw animation is based |
|
33 | * |
|
34 | * @var string |
|
35 | */ |
|
36 | protected $emoji; |
|
37 | ||
38 | /** |
|
39 | * Value of the dice, 1-6 for “🎲” and “🎯” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji |
|
40 | * |
|
41 | * @var int |
|
42 | */ |
|
43 | protected $value; |
|
44 | ||
45 | /** |
|
46 | * @return string |
|
47 | */ |
|
48 | public function getEmoji() |
|
49 | { |
|
50 | return $this->emoji; |
|
51 | } |
|
52 | ||
53 | /** |
|
54 | * @param string $emoji |
|
55 | */ |
|
56 | public function setEmoji($emoji) |
|
57 | { |
|
58 | $this->emoji = $emoji; |
|
59 | } |
|
60 | ||
61 | /** |
|
62 | * @return int |
|
63 | */ |
|
64 | public function getValue() |
|
65 | { |
|
66 | return $this->value; |
|
67 | } |
|
68 | ||
69 | /** |
|
70 | * @param int $value |
|
71 | */ |
|
72 | public function setValue($value) |
|
73 | { |
|
74 | $this->value = $value; |
|
75 | } |
|
76 | } |
|
77 |
@@ 15-79 (lines=65) @@ | ||
12 | * |
|
13 | * @package TelegramBot\Api\Types |
|
14 | */ |
|
15 | class PollOption extends BaseType implements TypeInterface |
|
16 | { |
|
17 | /** |
|
18 | * {@inheritdoc} |
|
19 | * |
|
20 | * @var array |
|
21 | */ |
|
22 | static protected $requiredParams = ['text', 'voter_count']; |
|
23 | ||
24 | /** |
|
25 | * {@inheritdoc} |
|
26 | * |
|
27 | * @var array |
|
28 | */ |
|
29 | static protected $map = [ |
|
30 | 'text' => true, |
|
31 | 'voter_count' => true |
|
32 | ]; |
|
33 | ||
34 | /** |
|
35 | * Option text, 1-100 characters |
|
36 | * |
|
37 | * @var string |
|
38 | */ |
|
39 | protected $text; |
|
40 | ||
41 | /** |
|
42 | * Number of users that voted for this option |
|
43 | * |
|
44 | * @var integer |
|
45 | */ |
|
46 | protected $voterCount; |
|
47 | ||
48 | /** |
|
49 | * @return string |
|
50 | */ |
|
51 | public function getText() |
|
52 | { |
|
53 | return $this->text; |
|
54 | } |
|
55 | ||
56 | /** |
|
57 | * @param string $text |
|
58 | */ |
|
59 | public function setText($text) |
|
60 | { |
|
61 | $this->text = $text; |
|
62 | } |
|
63 | ||
64 | /** |
|
65 | * @return int |
|
66 | */ |
|
67 | public function getVoterCount() |
|
68 | { |
|
69 | return $this->voterCount; |
|
70 | } |
|
71 | ||
72 | /** |
|
73 | * @param int $voterCount |
|
74 | */ |
|
75 | public function setVoterCount($voterCount) |
|
76 | { |
|
77 | $this->voterCount = $voterCount; |
|
78 | } |
|
79 | } |
|
80 |