Giter Site home page Giter Site logo

parse-mode's People

Contributors

khaosdoctor avatar knightniwrem avatar knorpelsenf avatar loskir avatar phaux avatar roj1512 avatar roziscoding avatar spechide avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

parse-mode's Issues

Default parse-mode does not work for ctx.editMessageMedia

Here is my code:

await ctx.editMessageMedia(
  {
    media: new InputFile('file-location.png'),
    type: 'photo',
    caption: "<code>Test code here</code>",
  },
  { message_id: messageId },
);

It looks default parse-mode does not seem to work for this. I haven't tested with other edit method but it's not working with editMessageMedia for me.

It works fine if I set parse_mode explicitly.

await ctx.editMessageMedia(
  {
    media: new InputFile('file-location.png'),
    type: 'photo',
    caption: "<code>Test code here</code>",
    parse_mode: 'HTML'
  },
  { message_id: messageId },
);

Using fmt in media captions (replyFmtWithPhoto, replyFmtWithMediaGroup, editMessageMedia)

Currently, there are some limitations when using fmt with media messages in grammY:

  1. replyFmtWithPhoto and replyFmtWithMediaGroup are supported in Telegraf, but there are no equivalent methods in grammY that allow using fmt in media captions during migration.
  2. Although setting parse_mode in editMessageMedia is now supported (#7), it seems that we still can't use fmt here.

It would be great to have a consistent way to use fmt for formatting text across all message types, including media captions. This would make the migration process from Telegraf to grammY smoother and provide a more intuitive formatting experience for developers.

Kindly are there any plans to add support for using fmt in media captions? If not, are there any recommended tricky workarounds?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.