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.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.
How It Works
A background asyncio task calleddaily_summary_scheduler runs continuously alongside the bot. It:
- Polls every 30 seconds to check the current time.
- When
DAILY_SUMMARY_ENABLEDisTrueand the current time matchesDAILY_SUMMARY_TIME(HH:MM format), it triggers a summary run. - For every active group in the database, it retrieves recent messages and sends them to Gemini with the configured
DAILY_SUMMARY_PROMPT. - The generated summary is posted directly to each group chat.
Configuration
| Config Key | Default | Description |
|---|---|---|
DAILY_SUMMARY_ENABLED | False | Set to True to enable the scheduler |
DAILY_SUMMARY_TIME | 00:00 | Time (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. |
Daily Cleanup
In addition to posting summaries, the scheduler runs daily database maintenance during its summary pass. It callsprune_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 defaultDAILY_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.
Summaries are only sent to chats that have recent message activity in the database. Inactive groups are skipped automatically.