File tree Expand file tree Collapse file tree 5 files changed +15
-9
lines changed Expand file tree Collapse file tree 5 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 3
3
return [
4
4
'by ' => 'by ' ,
5
5
'unknown_callback ' => 'Unknown Callback. Something went wrong! ' ,
6
+ 'invalid_request ' => '🤨 Invalid Request! ' ,
6
7
];
Original file line number Diff line number Diff line change 11
11
'server ' => 'To get Server Information ' ,
12
12
'settings ' => 'Go to settings of the bot ' ,
13
13
'back ' => 'Back ' ,
14
+
15
+ 'discussion ' => '🗨 Discussion ' ,
16
+ 'source_code ' => '💠 Source Code ' ,
14
17
];
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ public function __construct(Bot $bot)
28
28
* Answer the back button.
29
29
*
30
30
* @param string $callback
31
- *
32
31
* @return void
32
+ *
33
33
* @throws MessageIsEmptyException
34
34
* @throws BotException
35
35
* @throws CallbackException
@@ -71,6 +71,7 @@ public function answerBackButton(string $callback): void
71
71
72
72
/**
73
73
* @return void
74
+ *
74
75
* @throws MessageIsEmptyException
75
76
* @throws InvalidViewTemplateException
76
77
* @throws BotException|CallbackException
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ public function __construct(Bot $bot)
22
22
}
23
23
24
24
/**
25
- * @param Bot $bot
26
- *
25
+ * @param Bot $bot
27
26
* @return void
27
+ *
28
28
* @throws EntryNotFoundException
29
29
*/
30
30
public function sendStartMessage (Bot $ bot ): void
@@ -34,13 +34,14 @@ public function sendStartMessage(Bot $bot): void
34
34
['first_name ' => $ bot ->telegram ->FirstName ()]
35
35
);
36
36
$ bot ->sendPhoto (
37
- __DIR__ . '/../../resources/images/start.png ' ,
37
+ __DIR__ . '/../../resources/images/start.png ' ,
38
38
['caption ' => $ reply ]
39
39
);
40
40
}
41
41
42
42
/**
43
43
* @return void
44
+ *
44
45
* @throws EntryNotFoundException
45
46
* @throws MessageIsEmptyException
46
47
*/
@@ -64,7 +65,7 @@ public function handle(): void
64
65
case '/id ' :
65
66
case '/usage ' :
66
67
case '/server ' :
67
- $ this ->bot ->sendMessage (view (' tools. ' . trim ($ text , '/ ' )));
68
+ $ this ->bot ->sendMessage (view (" $ this -> viewNamespace :: tools." . trim ($ text , '/ ' )));
68
69
69
70
break ;
70
71
case '/settings ' :
@@ -76,7 +77,7 @@ public function handle(): void
76
77
77
78
break ;
78
79
default :
79
- $ this ->bot ->sendMessage (' 🤨 Invalid Request! ' );
80
+ $ this ->bot ->sendMessage (__ ( ' tg-notifier::app.invalid_request ' ) );
80
81
}
81
82
}
82
83
Original file line number Diff line number Diff line change 7
7
trait Markup
8
8
{
9
9
/**
10
- * Generate menu markup
10
+ * Generate menu markup.
11
11
*
12
12
* @return array[]
13
13
*/
14
14
public function menuMarkup (Telegram $ telegram ): array
15
15
{
16
16
return [
17
17
[
18
- $ telegram ->buildInlineKeyBoardButton (' 🗨 Discussion ' , config ('telegram-git-notifier.author.discussion ' )),
18
+ $ telegram ->buildInlineKeyBoardButton (__ ( ' tg-notifier::tools/menu.discussion ' ) , config ('telegram-git-notifier.author.discussion ' )),
19
19
], [
20
- $ telegram ->buildInlineKeyBoardButton (' 💠 Source Code ' , config ('telegram-git-notifier.author.source_code ' )),
20
+ $ telegram ->buildInlineKeyBoardButton (__ ( ' tg-notifier::tools/menu.source_code ' ) , config ('telegram-git-notifier.author.source_code ' )),
21
21
],
22
22
];
23
23
}
You can’t perform that action at this time.
0 commit comments