-
Notifications
You must be signed in to change notification settings - Fork 672
/
Copy pathCommandInterface.php
51 lines (45 loc) · 981 Bytes
/
CommandInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
namespace Telegram\Bot\Commands;
use Telegram\Bot\Api;
use Telegram\Bot\Objects\Update;
/**
* Interface CommandInterface.
*/
interface CommandInterface
{
/**
* Get Command Name.
*
* The name of the Telegram command.
* Ex: help - Whenever the user sends /help, this would be resolved.
*
* @return string
*/
public function getName();
/**
* Get Command Aliases
*
* Helpful when you want to trigger command with more than one name.
*
* @return array
*/
public function getAliases();
/**
* Get Command Description.
*
* The Telegram command description.
*
* @return string
*/
public function getDescription();
/**
* Process Inbound Command.
*
* @param Api $telegram
* @param string $arguments
* @param Update $update
*
* @return mixed
*/
public function make(Api $telegram, $arguments, Update $update);
}