Go to file
Dominika Liberda b433bba352 + exported everything (?) to event objects 2021-09-29 14:16:03 +02:00
README.md + README, minor fixes 2021-09-02 18:13:01 +02:00
tg.sh + exported everything (?) to event objects 2021-09-29 14:16:03 +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.