Completed
Push — master ( 5e4939...d9a3d5 )
by Camilo
01:45
created

SendDice::getMandatoryFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 6
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace unreal4u\TelegramAPI\Telegram\Methods;
6
7
use unreal4u\TelegramAPI\Abstracts\KeyboardMethods;
8
use unreal4u\TelegramAPI\Abstracts\TelegramMethods;
9
10
/**
11
 * Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned.
12
 *
13
 * Objects defined as-is June 2020, Bot API v4.9
14
 *
15
 * @see https://core.telegram.org/bots/api#senddice
16
 */
17
class SendDice extends TelegramMethods
18
{
19
    /**
20
     * Unique identifier for the target chat or username of the target channel (in the format @channelusername)
21
     * @var string
22
     */
23
    public $chat_id = '';
24
25
    /**
26
     * Optional. Emoji on which the dice throw animation is based. Currently, must be one of “🎲”, “🎯”, or “🏀”. Dice can
27
     * have values 1-6 for “🎲” and “🎯”, and values 1-5 for “🏀”. Defaults to “🎲”
28
     *
29
     * @var string
30
     */
31
    public $emoji = '🎲';
32
33
    /**
34
     * Optional. Sends the message silently. iOS users will not receive a notification, Android users will receive a
35
     * notification with no sound.
36
     * @see https://telegram.org/blog/channels-2-0#silent-messages
37
     * @var bool
38
     */
39
    public $disable_notification = false;
40
41
    /**
42
     * If the message is a reply, ID of the original message
43
     * @var int
44
     */
45
    public $reply_to_message_id = 0;
46
47
    /**
48
     * Optional. Additional interface options. A JSON-serialized object for a custom reply keyboard, instructions to
49
     * hide keyboard or to force a reply from the user.
50
     * @var KeyboardMethods
51
     */
52
    public $reply_markup;
53
54
    public function getMandatoryFields(): array
55
    {
56
        return [
57
            'chat_id',
58
        ];
59
    }
60
}
61