-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Expose the message type to on('message') #409
Labels
Comments
jlsjonas
added a commit
to jlsjonas/node-telegram-bot-api
that referenced
this issue
Aug 24, 2017
v0.30.0 passes metadata to the bot.on("message", function(message, metadata) {
console.log(metadata.type); // e.g. "photo"
}); |
N-Agency-member
pushed a commit
to N-Agency-member/TelegramBot-API-Node.js-
that referenced
this issue
Sep 3, 2024
passion-27
added a commit
to passion-27/node-telegram-bot
that referenced
this issue
Oct 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have:
Introduction
Especially useful for logging/tracking purposes, expose the message type to the
message
event, avoiding code duplication just to find out the message typeExample
(example using botanio, but would be applicable to pretty much any tracking library/system, the msg.text part is added as a more complete example, to track commands)
The text was updated successfully, but these errors were encountered: