Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how send a audio/video? #4

Closed
theolm opened this issue Jan 16, 2017 · 3 comments
Closed

how send a audio/video? #4

theolm opened this issue Jan 16, 2017 · 3 comments

Comments

@theolm
Copy link

theolm commented Jan 16, 2017

how can i make the bot send an audio file or a video (that already are in telegram servers) to a group?

@mildsunrise
Copy link
Member

When a file is uploaded to Telegram servers, it gets assigned a unique ID, such as BQADAgAD3gAD9HsZAAFphGBFqImfGAI. Simply pass that ID when sending:

reply.sticker("BQADAgAD3gAD9HsZAAFphGBFqImfGAI");
reply.video("...");
// ...

Look here for how to send all kinds of messages, until docs are finished. If you don't know the ID of your file, you can run the print example.

Important: The ID has to be used in the same context the file was uploaded. For instance, if the ID belongs to an image uploaded as photo, it can't be passed to reply.document(). You'd need to reupload in that case.

@theolm
Copy link
Author

theolm commented Jan 17, 2017

wow.
thanks for the quick reply.
you did a really good job with this framework.
congrats dude!

@mildsunrise
Copy link
Member

Most documentation finished now, see messages sending and the section on uploading files.
Closing the issue now, reopen if you see anything wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants