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

Can't edit thumbnail as InputFile on editMessageMedia #1984

Open
matteolungo opened this issue May 1, 2024 · 0 comments
Open

Can't edit thumbnail as InputFile on editMessageMedia #1984

matteolungo opened this issue May 1, 2024 · 0 comments

Comments

@matteolungo
Copy link

matteolungo commented May 1, 2024

Context

  • Telegraf.js Version: 4.16.3
  • Node.js Version: 18.15.0
  • Operating System: Windows 11

Minimal Example Code Reproducing the Issue

reply = await ctx.editMessageMedia({
    type: 'audio', media: {
        source: fs.readFileSync(`${title}.mp3`),
        thumbnail: { source: fs.readFileSync('thumbnail.jpg') }
    }
})

Expected Behavior

The thumbnail is being edited

Current Behavior

The API returns the error below (I use the same syntax to attach thumbnail in sendAudio method and it's working correctly).

Error Message and Logs

Error: 400: Bad Request: can't parse InputMedia: Field "thumbnail" must be of type String

@matteolungo matteolungo changed the title Can't edit thumbnail on editMessageMedia Can't edit thumbnail as InputFile on editMessageMedia May 1, 2024
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

1 participant