You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bot.command(commandsList.start.command,async(ctx)=>{const{ getUserInfo }=useUserApi(ctx);consttoken=ctx.update.message.text.trim().replace('/start ','').replace('-','|').trim();if(token.length>0&&ctx.update.message.text!='/start'&&token.includes('|')){try{// this is working finectx.session.userAuthToken=token;constuser_info: any=awaitgetUserInfo(token);if(user_info){// this is not working ctx.session.userAuthToken=token;ctx.session.user_id=user_info.user.user_id;ctx.session.email=user_info.user.email;ctx.reply(`${translate('login_success_msg')}`,{reply_markup: {remove_keyboard: true,},});}else{ctx.session.userAuthToken='';}console.log('🚀 ~ bot.command ~ ctx.session:',ctx.session);}catch(error){console.log(error);ctx.reply(`${translate('something_wrong')}`,{reply_markup: {keyboard: replyWithKeyboard,resize_keyboard: true,},});}}else{if(!ctx.session.userAuthToken){ctx.reply(`${translate('start_msg')}`,{reply_markup: {keyboard: replyWithKeyboard,resize_keyboard: true,},});}}});
The text was updated successfully, but these errors were encountered:
The real issue isn't here but somewhere else where you have a missing await. This usually somewhere that you have called next(), but you haven't awaited or returned it.
The text was updated successfully, but these errors were encountered: