Mike Cecconello

Results comments of Mike Cecconello

> Hi. You need to use the path `/YOUR_BOT_TOKEN` for the webhook (as I can see you are using `/webhook`), if you haven't changed the path [here](https://github.com/bot-base/telegram-bot-template/blob/679ab0a73c9a4b42a1f47ff7326a765ff6748565/src/server/index.ts#L19). I did change...

I think it does not matter as long as webhook url finishes with /webhook...no? I did set the webhook manually as ``` await bot.api.setWebhook(config.BOT_WEBHOOK, { allowed_updates: config.BOT_ALLOWED_UPDATES, }); ``` is...

> What did you set in `BOT_WEBHOOK`? It should be something like `https://vocal-sensible-hippo.ngrok-free.app/YOUR_BOT_TOKEN` or `https://vocal-sensible-hippo.ngrok-free.app/webhook` (if you changed the path [here](https://github.com/bot-base/telegram-bot-template/blob/679ab0a73c9a4b42a1f47ff7326a765ff6748565/src/server/index.ts#L19) to `/webhook`) The second one ``` { "ok": true,...

> > Wrong response from the webhook: 404 Not Found > > Looks like the `/webhook` path doesn't exist for some reason? Webhook endpoint exists, if I return like: `server.post("/endpoint",...

> > if I return like: `server.post("/endpoint", () => ({ status: true }));` it works > > Are you checking through ngrok or using 127.0.0.1? Maybe some tunneling issue? Through...

> > Error occurred: HttpError: Network request for 'setWebhook' failed! > > You can enable sensitive logs to see why it happens. Change this line: > > https://github.com/bot-base/telegram-bot-template/blob/679ab0a73c9a4b42a1f47ff7326a765ff6748565/src/main.ts#L10 > >...

Are we also sure fastify middleware works @deptyped ?

> > Are we also sure fastify middleware works @deptyped ? > > Hmm, I can confirm that something is broken. It seems to be related to [this change](https://github.com/grammyjs/grammY/commit/d18637f711a11026d1612791d9f518536b4ac88c) in...

I did change it: ``` const fastify = (req, reply) => ({ update: Promise.resolve(req.body), header: req.headers[SECRET_HEADER_LOWERCASE], end: () => reply.status(200).send(), respond: (json) => reply.send(json), unauthorized: () => reply.code(401).send(WRONG_TOKEN_ERROR), }); ```...

Any idea? On Wed, 15 May 2024, 01:48 deptyped, ***@***.***> wrote: > How can I revert it on my end? > > The simplest way is to manually revert the...