1 | <?php |
||
15 | abstract class Intent implements Conversable |
||
16 | { |
||
17 | use InteractsWithContext, |
||
18 | SendsMessages, |
||
19 | Authorization, |
||
20 | HasActivators, |
||
21 | Transitions; |
||
22 | |||
23 | /** |
||
24 | * Determine if intent passes the authorization check. |
||
25 | * |
||
26 | * @return bool |
||
27 | */ |
||
28 | 1 | public function passesAuthorization(): bool |
|
32 | |||
33 | /** |
||
34 | * Intent activators. |
||
35 | * |
||
36 | * @return Activator[] |
||
37 | */ |
||
38 | abstract public function activators(): array; |
||
39 | |||
40 | /** |
||
41 | * Run intent. |
||
42 | */ |
||
43 | abstract public function run(): void; |
||
44 | |||
45 | /** |
||
46 | * Handle intent. |
||
47 | * |
||
48 | * @param Bot $bot |
||
49 | */ |
||
50 | 2 | public function handle(Bot $bot): void |
|
55 | } |
||
56 |