yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.31k stars 1.51k forks source link

Fix: added messageId field in unpinChatMessage #928

Closed HeySreelal closed 2 years ago

HeySreelal commented 2 years ago

Description

Added messageId field in unpinChatMessage to unpin a particular chat message.

References

TelegramBot.unpinChatMessage

arman-oganesyan commented 2 years ago

@yagop please take a look at this PR. It's quite important feature to me.

arman-oganesyan commented 2 years ago

@HeySreelal in pinMessage disable_notification field is also missed. Could I please ask you to implement this in a new PR? 🙏

https://core.telegram.org/bots/api#pinchatmessage

HeySreelal commented 2 years ago

@arman-oganesyan, thanks for the reply! The disable_notification can be passed directly into the form object, right? So, should I really change anything there? Please let me know, I'll be happy to contribute!

arman-oganesyan commented 2 years ago

@HeySreelal thank you for your reply. I have not noticed that this can be passed to form object, as I am a bit new to JavaScript. You are right, nothing should be implemented regarding disable_notification.

Thank you.

HeySreelal commented 2 years ago

Perfect! Thanks for confirming @arman-oganesyan. 🚀

Looking forward to contributing more! Have a great time.

kamikazechaser commented 2 years ago

message_id is an optional parameter. It can already be used. All optional parameters can be passed as an object to any method in this library.

unpinChatMessage(chatId, {message_id: yourMessageId})