Your Telegram bot
Each server has its own bot, which you create; there is no shared Kotiko bot.
Create the bot
Section titled “Create the bot”- In Telegram, open a chat with @BotFather and send
/newbot. Pick a name (Kotiko, say) and a username ending inbot(likeyourname_kotiko_bot), and copy the token. - Put it in
server/.envasTELEGRAM_BOT_TOKEN=and restart the server. - Message your bot anything. It replies with your Telegram ID. Put it in
.envasALLOWED_TELEGRAM_IDS=123456789and restart. From then on the bot ignores everyone else.
Using it
Section titled “Using it”Send a word or a question, the same things the toolbar popup understands: shukran,
how do you say dog in japanese, da in serbian. what does дом mean shows a card with
Add and Skip.
| Command | What it does |
|---|---|
add sobaka or /add sobaka |
Saved at once, with a card to undo it |
/list |
Your 15 newest words and the total |
/list arabic |
The newest words in one language |
/languages |
How many words you have in each language |
/remove да |
Stops swapping that word |
/bases es en |
The languages meanings are in, the one you read most first (Kotiko sets them too) |
/language es |
The language the bot writes in; /language auto follows your Telegram app |
The bot gives meanings in the languages you read: the ones you chose in Kotiko, which it sends to your connected server, or else your Telegram app's language.
Voice notes
Section titled “Voice notes”Telegram sends bots the recording, not a transcript, so the server needs a speech-to-text service. Without one, typing works, and so does your phone keyboard's microphone button.
To run Whisper on your own computer (needs cmake, git and ffmpeg):
git clone https://github.com/ggml-org/whisper.cppcd whisper.cppsh ./models/download-ggml-model.sh large-v3cmake -B build && cmake --build build -j --config Release./build/bin/whisper-server -m models/ggml-large-v3.bin \ --host 127.0.0.1 --port 8178 -l auto --convertThen in server/.env:
TRANSCRIBE_URL=http://localhost:8178/inferenceand restart. Any OpenAI-compatible /v1/audio/transcriptions address works too; set
TRANSCRIBE_API_KEY and TRANSCRIBE_MODEL for those.
Messages to the bot pass through Telegram, under Telegram's privacy policy.
