diff --git a/extensions/telegram/src/bot-native-commands.ts b/extensions/telegram/src/bot-native-commands.ts index 4337afc1408..3f46a8525d9 100644 --- a/extensions/telegram/src/bot-native-commands.ts +++ b/extensions/telegram/src/bot-native-commands.ts @@ -186,7 +186,10 @@ async function resolveTelegramCommandAuth(params: { const chatId = msg.chat.id; const isGroup = msg.chat.type === "group" || msg.chat.type === "supergroup"; const messageThreadId = (msg as { message_thread_id?: number }).message_thread_id; - const getChat: TelegramGetChat = bot.api.getChat.bind(bot.api); + const getChat = + typeof bot.api.getChat === "function" + ? (bot.api.getChat.bind(bot.api) as TelegramGetChat) + : undefined; const isForum = await resolveTelegramForumFlag({ chatId, chatType: msg.chat.type, diff --git a/src/plugins/slots.test.ts b/src/plugins/slots.test.ts index 23eadf1d1b3..4a3c61d07c9 100644 --- a/src/plugins/slots.test.ts +++ b/src/plugins/slots.test.ts @@ -132,7 +132,7 @@ describe("applyExclusiveSlotSelection", () => { config, selectedId, ...(selectedKind ? { selectedKind } : {}), - ...(registry ? { registry } : {}), + ...(registry ? { registry: { plugins: [...registry.plugins] } } : {}), }); });