File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 63
63
$ content = array ('chat_id ' => $ chat_id , 'reply_markup ' => $ keyb , 'text ' => $ reply );
64
64
$ telegram ->sendMessage ($ content );
65
65
}
66
- if ($ text == "/git " ) {
66
+
67
+ elseif ($ text == "/git " ) {
67
68
$ reply = "Check me on GitHub: https://github.com/Eleirbag89/TelegramBotPHP " ;
68
69
// Build the reply array
69
70
$ content = array ('chat_id ' => $ chat_id , 'text ' => $ reply );
70
71
$ telegram ->sendMessage ($ content );
71
72
}
72
73
73
- if ($ text == "/img " ) {
74
+ elseif ($ text == "/img " ) {
74
75
// Load a local file to upload. If is already on Telegram's Servers just pass the resource id
75
76
$ img = curl_file_create ('test.png ' ,'image/png ' );
76
77
$ content = array ('chat_id ' => $ chat_id , 'photo ' => $ img );
81
82
$ telegram ->downloadFile ($ file ["result " ]["file_path " ], "./test_download.png " );
82
83
}
83
84
84
- if ($ text == "/where " ) {
85
+ elseif ($ text == "/where " ) {
85
86
// Send the Catania's coordinate
86
87
$ content = array ('chat_id ' => $ chat_id , 'latitude ' => "37.5 " , 'longitude ' => "15.1 " );
87
88
$ telegram ->sendLocation ($ content );
You can’t perform that action at this time.
0 commit comments