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

Additional types for specific messages #1643

Closed
atassis opened this issue Jun 22, 2022 · 1 comment
Closed

Additional types for specific messages #1643

atassis opened this issue Jun 22, 2022 · 1 comment

Comments

@atassis
Copy link
Contributor

atassis commented Jun 22, 2022

Add types for messages with additional data provided.
For example, we have request_contact option for KeyboardButton. If we send a contact to a bot- it will come as a Contact object in a message. No types for this are provided.

bot.on('message', (ctx, next) => {
  if(ctx.update.message.contact) {
    console.log(ctx.update.message);
  }
});

Hope this code helps (might write smth erronously)
Also you might want to look through all types of messages and add else existing types

@wojpawlik
Copy link
Member

Duplicate of #1388

@wojpawlik wojpawlik marked this as a duplicate of #1388 Jun 29, 2022
@wojpawlik wojpawlik closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants