Skip to content

Instantly share code, notes, and snippets.

@Khuzha
Last active September 12, 2018 16:37
Show Gist options
  • Save Khuzha/433ebb59b9cee3d187a8d72db9890bca to your computer and use it in GitHub Desktop.
Save Khuzha/433ebb59b9cee3d187a8d72db9890bca to your computer and use it in GitHub Desktop.
Вот тут:
bot.on('text', (ctx) => {
if (ctx.chat.id == data.myid){
if(ctx.update.message && ctx.update.message.reply_to_message) {
ctx.sendMessage(ctx.update.message.reply_to_message.from.id, ctx.message)
}.........
Выдает вот эту ошибку:
TypeError: ctx.sendMessage is not a function
at bot.on (/home/oneuser/MyProjects/bots/contactbot/index.js:20:11)
at Promise.resolve.then (/home/oneuser/MyProjects/bots/contactbot/node_modules/telegraf/composer.js:107:56)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Failed to process updates. TypeError: ctx.sendMessage is not a function
at bot.on (/home/oneuser/MyProjects/bots/contactbot/index.js:20:11)
at Promise.resolve.then (/home/oneuser/MyProjects/bots/contactbot/node_modules/telegraf/composer.js:107:56)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment