I must program in php due to company needs... but I am working with php for first time... and it's the first time I am working with telegram bot :'(
In some way, before, when i ran the command /start
and doWork
everything worked...
but now I must modify the bot, in a way that all commands are "hidden" behind some telegram button... Here how I edited my php page:
if(strpos($text, "/start") === 0)
{
$response = "Ciao $firstname, benvenuto!";
$keyboard = [
'inline_keyboard' => [
[
['text' => 'forward me to groups']
]
]
];
$encodedKeyboard = json_encode($keyboard);
$parameters =
array(
'chat_id' => $chatId,
'text' => $response,
'reply_markup' => $encodedKeyboard
);
$parameters["method"] = "sendMessage";
echo json_encode($parameters);
}
With BotFather I ran the command /setinline
too...
So I think I am working how I parameters
array.. can anyone help me please?
Ps.: (if can anyone suggest me also an IDE I work with please... i am using notepad++ now)
Thank you all