Skip to content

InlineQueryResultVideo hasn't approptiate constructor #416

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

Closed
90K2 opened this issue Feb 8, 2025 · 2 comments · Fixed by #417
Closed

InlineQueryResultVideo hasn't approptiate constructor #416

90K2 opened this issue Feb 8, 2025 · 2 comments · Fixed by #417

Comments

@90K2
Copy link

90K2 commented Feb 8, 2025

Both of current costructors has required field inputMessageContent or wrapped for same reasons messageText

The thing is

input_message_content | InputMessageContent | Optional. Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).

so there's no option to actually send video from inline right now.
Using both of available constructors, choosen inline result replacing with messageText instead of video

Suggested resolution: one simple ( and I believe it should be the main) constructor with only neccessary arguments

    public InlineQueryResultVideo(String id, String videoUrl, String mimeType, String thumbUrl, String title) {
        super("video", id);
        this.video_url = videoUrl;
        this.mime_type = mimeType;
        this.thumbnail_url = thumbUrl;
        this.title = title;
    }
@90K2
Copy link
Author

90K2 commented Feb 8, 2025

@anfanik @pengrad

@anfanik
Copy link
Collaborator

anfanik commented Feb 8, 2025

Let's rewrite it to Kotlin! :D

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

Successfully merging a pull request may close this issue.

2 participants