11 ответов

26 просмотров

and if you go that route, there are other stuff you'll have to take care of: Use this method to get basic info about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>, where <file_path> is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.

I'm used file_id Instead of the link to the file within the channel telegram

Lord unreal4u X
I did not understand this. Can you reformulate the...

bot('senddocument',[ 'chat_id'=>$chat_id, 'document'=>'https://t.me/BotListChat/386257'}); I want delete the channel and use file_id bot('senddocument',[ 'chat_id'=>$chat_id, 'document'=>'BQACAgQAAxkBAAEIS15iL0pThKTsdkrXnPF0Om9Ztna6UQACkREAAl3fYFFdo9zey-trGiME'});

I don't think the file_id expires, as long as the file is still on Telegram's servers... I don't know how Telegram's servers do operate, but I would adopt a scheme to check how many references a file still has before deleting it. This means that if the channel is deleted and the file wasn't present on any other chat_id, it will be deleted together with the channel... BUT BIG DISCLAIMER: this is how I imagine it works, I really really don't know if that is the case

i can do that now for science sake

Kr🇫🇷🦜 zwan
i can do that now for science sake

oh that would be nice, I'm actually curious now haha

Lord unreal4u X
and if you go that route, there are other stuff yo...

But why should I download this file? Or better: what is it this file?

Похожие вопросы

Карта сайта