telegram-reminder-bot

command module
v0.4.77 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Telegram Reminder Bot

A telegram reminder bot which reserves messages for certain times, using Google Gemini API.

Reserve messages with natural language like:

"Tell me to turn the light off 5 minutes later."

"Send me this message at 09:00 tomorrow."

"한 달 뒤 다 때려치우라고 해줘"

... etc.

Prerequisites

  • A Google API key, and
  • a machine which can build and run golang applications.

Gemini 1.5 Pro or Flash model is needed for several features. (eg. system instruction, etc.)

Configurations

Create a configuration file:

$ cp config.json.sample config.json
$ vi config.json

and set your values:

{
  "google_generative_model": "gemini-4-hydrogen",

  "allowed_telegram_users": ["user1", "user2"],
  "db_filepath": "/path/to/reminder-db.sqlite",
  "default_hour": 8,
  "verbose": false,

  "telegram_bot_token": "123456:abcdefghijklmnop-QRSTUVWXYZ7890",
  "google_ai_api_key": "abcdefg-987654321"
}
Using Infisical

You can use Infisical for retrieving your bot token and api key:

{
  "google_generative_model": "gemini-4-hydrogen",

  "allowed_telegram_users": ["user1", "user2"],
  "db_filepath": null,
  "default_hour": 8,
  "verbose": false,

  "infisical": {
    "client_id": "012345-abcdefg-987654321",
    "client_secret": "aAbBcCdDeEfFgG0123456789xyzwXYZW",

    "project_id": "012345abcdefg",
    "environment": "dev",
    "secret_type": "shared",

    "telegram_bot_token_key_path": "/path/to/your/KEY_TO_REMINDER_BOT_TOKEN",
    "google_ai_api_key_key_path": "/path/to/your/KEY_TO_GOOGLE_API_KEY"
  }
}

Build

$ go build

Run

Run the binary directly

Run the built binary file with the config file's path:

$ ./telegram-reminder-bot /path/to/config.json
Or run it as a systemd service

Create a systemd service file:

[Unit]
Description=Telegram Reminder Bot
After=syslog.target
After=network.target

[Service]
Type=simple
User=ubuntu
Group=ubuntu
WorkingDirectory=/dir/to/telegram-reminder-bot
ExecStart=/dir/to/telegram-reminder-bot/telegram-reminder-bot /path/to/config.json
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

and systemctl enable|start|restart|stop the service.

Commands

  • /stats for statistics of parsed/generated messages.
  • /cancel for cancelling reserved messages.
  • /list for listing reserved messages.
  • /help for help message.

Todo

  • Optimize prompts.
  • I18nalize bot messages.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址