No description
Go to file
2021-09-02 18:13:01 +02:00
README.md + README, minor fixes 2021-09-02 18:13:01 +02:00
tg.sh + README, minor fixes 2021-09-02 18:13:01 +02:00

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.