Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AmiraliNotFound/dummy-gemini-bot/llms.txt

Use this file to discover all available pages before exploring further.

The bot includes a background scheduler that automatically posts a daily summary of group chat activity at a configured time each day. Summaries are generated by Gemini using a customizable prompt — defaulting to a sarcastic, bullet-point recap that calls out participants by name.

How It Works

A background asyncio task called daily_summary_scheduler runs continuously alongside the bot. It:
  1. Polls every 30 seconds to check the current time.
  2. When DAILY_SUMMARY_ENABLED is True and the current time matches DAILY_SUMMARY_TIME (HH:MM format), it triggers a summary run.
  3. For every active group in the database, it retrieves recent messages and sends them to Gemini with the configured DAILY_SUMMARY_PROMPT.
  4. The generated summary is posted directly to each group chat.
The 30-second polling interval means summaries are delivered within 30 seconds of the configured time.

Configuration

Config KeyDefaultDescription
DAILY_SUMMARY_ENABLEDFalseSet to True to enable the scheduler
DAILY_SUMMARY_TIME00:00Time (24-hour HH:MM format) at which the summary is posted each day
DAILY_SUMMARY_PROMPT(Persian sarcastic prompt)System prompt used to generate the summary. Editable in the admin Settings tab.
Enable daily summaries directly from the admin dashboard Settings tab without restarting the bot. When the scheduler is disabled it polls every 60 seconds; once enabled, it polls every 30 seconds. Changes to DAILY_SUMMARY_TIME take effect on the next 30-second poll cycle.

Daily Cleanup

In addition to posting summaries, the scheduler runs daily database maintenance during its summary pass. It calls prune_guest_albums() to delete cached guest album records that are older than 3 days, preventing the database from accumulating stale inline-mode album data indefinitely.

Summary Content

The default DAILY_SUMMARY_PROMPT instructs Gemini to produce a 3–4 bullet sarcastic Persian summary of the day’s conversations, referencing participants by their Telegram display names. Example output style:
  • 📌 Ali spent most of the day arguing about tabs vs spaces — no resolution reached.
  • 📌 Sara sent 47 voice notes. Nobody listened to a single one.
  • 📌 The group collectively decided to “fix it tomorrow” for the 12th day in a row.
The prompt is fully configurable — replace it with a formal summary, a different language, or a topic-specific recap via the admin Settings tab.
Summaries are only sent to chats that have recent message activity in the database. Inactive groups are skipped automatically.

Build docs developers (and LLMs) love