I have an issue with receiving channel updates.
I tried this: $telegram->getUpdateType()=='channel_post'
`
file_put_contents($mainpath.'channel.txt', print_r($telegram->getUpdateType(), TRUE));
$logfile = new CURLFile(realpath($mainpath.'channel.txt'));
$content = ['chat_id' => $someone,
"document" => $logfile,
];
$telegram->sendDocument($content);
`
but I notice that no updates are sent to the bot!
I tried also this:
$content = ['chat_id' => $someone,
"document" => $logfile,
];
$telegram->sendDocument($content);
`
but I didn't receive any updates from channels! Am I wrong in my code?
I want to find out when a channel send a post, like when a post is sent to the supergroup and the bot get an update.
I have an issue with receiving channel updates. I tried this: $telegram->getUpdateType()=='channel_post' ` file_put_contents($mainpath.'channel.txt', print_r($telegram->getUpdateType(), TRUE)); $logfile = new CURLFile(realpath($mainpath.'channel.txt'));
$content = ['chat_id' => $someone, "document" => $logfile, ]; $telegram->sendDocument($content); ` but I notice that no updates are sent to the bot! I tried also this:
` $result = $telegram->getData(); file_put_contents($mainpath.'channel.txt', print_r($result , TRUE)); $logfile = new CURLFile(realpath($mainpath.'channel.txt'));
$content = ['chat_id' => $someone, "document" => $logfile, ]; $telegram->sendDocument($content); ` but I didn't receive any updates from channels! Am I wrong in my code? I want to find out when a channel send a post, like when a post is sent to the supergroup and the bot get an update.