Skip to main content

Telegram bot

Open @dgift_bot on Telegram

It's the same bot under two names — @Dhammagift_bot and its short form @Dgift_bot — same functionality, either one works. It works in two ways: inline, right in the message box of any chat or group, and in its own chat, where the same things work plus the commands and the settings.

Inline​

Type @dgift_bot in the message box of any chat and then a Pali word (kacchapa), a text number (mn10, sn56.11) or Velthuis transliteration (.t .d .n ~n aa ii uu → ṭ ḍ ṇ ñ ā ī ū, so satipa.t.thaana works as well as satipaṭṭhāna). Telegram answers with:

  • ✏️ Send: <text> — the main result: that text with links to the site and the dictionary;
  • dictionary words that match what you typed — pick one, and the message uses the proper spelling with diacritics.
@dgift_bot sn56.11 in the message box of a chat: Send: sn56.11, sn56.11 Dhammacakkappavattanasutta, sn56.111-113 Devamanussanirayādisutta

Above the list there is a button — 🔎 Open Dhamma.gift En: sn56.11 — it opens Dhamma.gift as a Mini App with the query already searched.

Search and read​

A picked result lands in the chat as a message of the bot: the text, the links and, under the message, the buttons.

The sent message: sn56.11 with the links Dhamma.gift and Dictionary, and the buttons Lang En/Ru, Dictionary, Read at Dhamma.gift En
  • 🔎 Dhamma.gift — the word or the text in the site's search;
  • 📘 Dictionary — the word in the dictionaries (dict.dhamma.gift);
  • Read at 🔎 Dhamma.gift En — the text itself, in the reader.

An extra word does not break the link: mn10 metta still opens mn10.

The same search and reader are the Mini Apps behind /extra: search, reading and dictionary.

Uposatha days​

/uposatha in the bot's chat, or @dgift_bot uposatha in any chat — the next 30 days as the suttas count them: the 8th, 14th and 15th lunar day of each half-month, six days a month. Without a city the list is the one for Bodh Gaya, where the day runs from 18:00 to 18:00.

@dgift_bot uposatha Chiang Mai (or /uposatha Chiang Mai) — the same days with the real sun times of a city: when the day begins (sunset), dawn, noon and when it ends (the next sunset). The city is remembered, so the bare command keeps using it; /uposatha reset forgets it. The city is looked up in a local gazetteer of every city above ~15 000 people (34k of them, spelling mistakes tolerated), with the Open-Meteo geocoder for the rest.

@dgift_bot uposatha bodh gaya in the message box: Uposatha days, next 30 days — Bodh Gaya, Bihar, India

The dates are the same for everybody — the moon is one — and only the sun times are local. The list ends with Times: begin · dawn · noon · end, and two buttons sit under the message: the Ru/En switch and the link to the full calendar at dhamma.gift/uposatha-calendar.

The sent Uposatha message: Uposatha by the suttas for the next 30 days (Bodh Gaya, Bihar, India) with six days and their times, the line Times: begin · dawn · noon · end, and the buttons Lang En/Ru and Uposatha calendar

In the bot's chat​

Everything above works here too — just without @dgift_bot: send a word (saariputta), a text number (mn10) or uposatha, and you get the same message with the same links and buttons. On top of that, the bot has commands and settings.

CommandWhat it does
/startthe welcome message and the interface language
/extralinks to the Mini Apps: search, reading, dictionary
/uposathaUposatha days for the next 30 days
/helphelp (in progress)

Settings​

  • Language — /start switches it, and so does the button under any message (Lang En/Ru / Язык Ru/En). The choice is remembered and affects the links: the Russian interface leads to dhamma.gift/ru and dict.dhamma.gift/ru.
  • The city for the Uposatha list — /uposatha <city> remembers it, /uposatha reset forgets it, and the empty /uposatha keeps showing it.
  • The Menu button next to the message box (DG en / DG ru) — opens dhamma.gift as a Mini App in the language you chose.