telegram.sh/README.md

480 B

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.