Skip to content

Conversation

@jsmnbom
Copy link
Member

@jsmnbom jsmnbom commented May 20, 2017

refs #617
This is where it gets weird....
According to telegram length is Video width and height.. but how that works with one parameter I couldn't tell you.. it also seems to be required but is not marked as such in the documentation....

@jsmnbom jsmnbom changed the base branch from master to beta May 21, 2017 12:45
@jsmnbom jsmnbom changed the base branch from beta to master May 21, 2017 13:41
Copy link
Member

@tsnoam tsnoam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments on code.

long. Use this method to send video messages
Args:
chat_id (int|str): Unique identifier for the message recipient - Chat id.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/voice/vide_note/
type: InputFile|str

url = '{0}/sendVideoNote'.format(self.base_url)

data = {'chat_id': chat_id, 'video_note': video_note}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if duration is not None
(and same for length below)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure? We don't do that anywhere else in bot.py?

self.input_file = data.pop('certificate')
elif 'video_note' in data:
self.input_name = 'video_note'
self.input_file = data.pop('video_note')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder - we have a lot of branching here. Should we move to a dict here? It's much more pythonic.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you meant.. does this work?

])

# Add input_file to upload
# Add input_file to upload
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please return the leading indentation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, danm yapf

sticker=None,
video=None,
voice=None,
video_note=None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same note like I left on #628 - should new parameters be added in the middle or in the end of the function?

@tsnoam tsnoam merged commit ae33d33 into master May 26, 2017
@jsmnbom jsmnbom deleted the videonote branch June 18, 2017 10:43
@github-actions github-actions bot locked and limited conversation to collaborators Aug 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants