Go to file
Dominika Liberda 53cfd77b2f + added file upload by id 2021-09-30 15:08:19 +02:00
README.md + README, minor fixes 2021-09-02 18:13:01 +02:00
tg.sh + added file upload by id 2021-09-30 15:08:19 +02:00

README.md

telegram.sh, a telegram bot api library in bash

This library aims to make creating quick-and-dirty bots in Bash as easy as possible.

#!/bin/bash
source tg.sh
TELEGRAM_TOKEN=""

function _on_msg() {
	echo "${event[from_username]}: ${event[text]}"

	if [[ "${event[text]}" == "o/" ]]; then
		tg_send ${event[chat_id]} "\o"
	fi
}

tg_start

The above example is all you need to create a basic telegram bot. The library is currently very WiP. Please proceed with caution.