IlyaSemenov / grammy-scenes

Nested named scenes for grammY
MIT License
30 stars 0 forks source link

.wait() doesn't work now? #10

Closed FanVanDEV closed 2 years ago

FanVanDEV commented 2 years ago

Hello! .wait() doesn't work now?

Main

type SessionData = ScenesSessionFlavor & {}
export type BotContext = Context & customSessionFlavor & adminFlavor & ScenesFlavor & SessionFlavor<SessionData>;
export const bot = new Bot<BotContext>();

(async () => {
    await appDataSource.initialize();

    bot.use(
        session({
            initial: () => ({}),
        })
    )
    bot.use(importScenes.manager())

    // commands here

    bot.use(importScenes);

    await bot
        .start({
            limit: 32,
            allowed_updates: ["my_chat_member", "message", "callback_query"],
        })
        .then(async () => {
            console.log("Bot started!");
        });
})();

I`m using the scene from the example. Nothing happens after the "Enter your name" step

FanVanDEV commented 2 years ago

I'm sorry. bot.use(importScenes); need to place BEFORE commands.