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
typescript не работает автодополнение #13
Comments
Ой не, я гоню, это только под Telegraf.js работает... Пробовали дебажить то? |
https://github.com/telegraf/telegraf/blob/develop/core/context.js#L110-L120 |
@Bobrovskih судя по документации https://core.telegram.org/bots/api#message, поле а вот то, что там |
В версии 3.6.0 всё правильно https://github.com/sergeysova/telegram-typings/blob/v3.6.0/javascript/index.d.ts#L251 |
Так а он const message = ctx.message
|| ctx.edited_message
|| ctx.channel_post
|| ctx.edited_channel_post
// || ctx.inline_query
// || ctx.chosen_inline_result
// || ctx.callback_query
// || ctx.shipping_query
// || ctx.pre_checkout_query
const { from } = message |
@Piterden автор вопроса юзает именно |
if (from) { ... } помогает, спасибо |
А покажи куда ты вставил условие, @Bobrovskih |
не работает автодополнение
и появляется ошибка при попытке считать свойство ctx.message.from
[ts] Type 'Message | undefined' has no property 'from' and no string index signature.
typescript 2.8.3
telegram-typings 3.6.0
The text was updated successfully, but these errors were encountered: