mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2025-12-06 15:35:35 +01:00
Fix handle update bug
This commit is contained in:
@@ -126,6 +126,9 @@ export default class BotsManager {
|
|||||||
static async handleUpdate(req: Request, res: Response, next: NextFunction) {
|
static async handleUpdate(req: Request, res: Response, next: NextFunction) {
|
||||||
const botIdStr = req.url.split("/")[1];
|
const botIdStr = req.url.split("/")[1];
|
||||||
const bot = this.bots[parseInt(botIdStr)];
|
const bot = this.bots[parseInt(botIdStr)];
|
||||||
|
|
||||||
|
if (bot === undefined) return;
|
||||||
|
|
||||||
await bot.webhookCallback(`/${botIdStr}/${bot.telegram.token}`)(req, res);
|
await bot.webhookCallback(`/${botIdStr}/${bot.telegram.token}`)(req, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user