-
Notifications
You must be signed in to change notification settings - Fork 3
About
A telegram bot written in bash, which can perform various functions over Telegram Bot API. You can take this project as a template for making your own bot.
Uses https://core.telegram.org/bots/api for API calls.
Telegram bots are small programs that can embed in Telegram chats or public channels and perform a specific function. They can offer customized keyboards, produce cat memes on demand, or even accept payments and act as a digital storefront.
So we are here to help you. We are providing you this template for creating your own bot written in bash
.
All you need is bash
to be installed in your system with some other dependencies listed below. We even have Docker support (Beta).
- curl
- jq
- bc
Some other Dependencies too but mostly they are pre-installed on most systems. Full list will be updated soon.
Recquired first time for setting up your config.
bash init.sh
Make sure your configs are stored in
.token
before running in non-interactive mode.
bash tgbot.sh
Well, this would be lot easier if you are using this template. Below are guides to get started.
All functions of bot are present in bot/
which are sourced to tgbot.sh. By this way we make our code look simpler and more human readable.
We made calling Telegram Bot API simpler with help of util.sh
. Like, You can send message by tg --sendmsg "<chat id>"
and edit message by tg --editmsg "<chat id>" "<message id>"
.
We would be adding more Documentation on this topic in future.
Above commands will only work when you have your
Bot token
stored in.token
file of current directory.
All functions related to Telegram Bot API are present in util.sh
. You can add new methods following the current style of variable names
to look it simpler.
Feel free to contribute to any part of this project. (Like Documentation, Adding more methods and feature and endless possiblities).
By @noobyysauraj & @Hakimi0804