diff --git a/bot/bot.ts b/bot/bot.ts index fdaabc2..6d2e5d5 100644 --- a/bot/bot.ts +++ b/bot/bot.ts @@ -1653,7 +1653,21 @@ bot.on("message:text", async (ctx) => { } if (!reply) { - if (!ranTool) console.warn("redstone: no reply and no tool ran for", { chatId, text: text.slice(0, 80) }); + if (!ranTool) { + // Both providers returned null AND nothing useful happened during the + // turn — surface that to the user instead of silently dropping the + // message. Usually means OpenRouter hit its free-tier rate limit and + // Gemini is also down/throttled; tell them what to do. + console.warn("redstone: no reply and no tool ran for", { chatId, text: text.slice(0, 80) }); + try { + await ctx.reply( + "🤖 AI is unreachable right now — both OpenRouter and Gemini just declined. " + + "Usually the free-tier daily cap resetting around UTC midnight. Try again in a few minutes, " + + "or use /model to pick a different model.", + { parse_mode: "HTML", reply_parameters: { message_id: ctx.message.message_id } }, + ); + } catch { /* if even the error reply fails, nothing more we can do */ } + } return; }