I tried to follow the API to set my bot commands, but it is not working. Here is the function:
function setMyCommands($cmds) {
$cmds_encoded = json_encode($cmds);
apiRequest("setMyCommands?commands=".$cmds_encoded);
}
This is the commands array:
$cmds_available = [
["command" => "a", "description" => "aaa"],
["command" => "b", "description" => "bbb"],
["command" => "c", "description" => "ccc"],
];
I call this function: setMyCommands($cmds_available);
The function was successfully called. But the commands are not updated. I used apiRequest("getMyCommands")
to get my commands. They are the old ones.
I was adjusting here and there. It worked once before. But then it never worked again. I don't know if I might have messed up somewhere.
Any help appreciated!