Completed
Push — master ( 25d74a...9d4d02 )
by Armando
02:14
created

InlinequeryCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 2
nc 1
nop 0
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\Commands\SystemCommands;
12
13
use Longman\TelegramBot\Commands\SystemCommand;
14
use Longman\TelegramBot\Entities\InlineQuery\InlineQueryResultArticle;
15
use Longman\TelegramBot\Entities\InputMessageContent\InputTextMessageContent;
16
use Longman\TelegramBot\Request;
17
18
/**
19
 * Inline query command
20
 */
21
class InlinequeryCommand extends SystemCommand
22
{
23
    /**
24
     * @var string
25
     */
26
    protected $name = 'inlinequery';
27
28
    /**
29
     * @var string
30
     */
31
    protected $description = 'Reply to inline query';
32
33
    /**
34
     * @var string
35
     */
36
    protected $version = '1.0.0';
37
38
    /**
39
     * Command execute method
40
     *
41
     * @return mixed
42
     * @throws \Longman\TelegramBot\Exception\TelegramException
43
     */
44
    public function execute()
45
    {
46
        //$inline_query = $this->getUpdate()->getInlineQuery();
47
        //$user_id      = $inline_query->getFrom()->getId();
48
        //$query        = $inline_query->getQuery();
49
50
        return Request::answerInlineQuery(['inline_query_id' => $this->getUpdate()->getInlineQuery()->getId()]);
51
    }
52
}
53