You first create a bot, then join a chat with that bot, then control the bot via the http api
api: https://core.telegram.org/bots/api
quickstart (just to send messages, not mine): https://gist.github.com/dideler/85de4d64f66c1966788c1b2304b9...