Welcome to Telebot, a simple example Telegram bot built in Go and using telegram-bot-api
This telebot is a basic Telegram bot that responds to commands and messages. It's a starting point for building more complex Telegram bots with additional features.
/start
: Start the bot and receive a welcome message./hello
: Greet the bot and receive a friendly response.s
- Go installed on your local machine (https://golang.org/doc/install)
- Telegram Bot API Token (Obtain one by talking to the BotFather on Telegram: https://core.telegram.org/bots#botfather)
-
Clone this repository to your local machine:
git clone https://github.com/hebobibun/telebot.git
-
Navigate to the project directory:
cd telebot
-
Create a .env file in the project root and add your Telegram Bot API Token (or pass when app is executed):
TELEGRAM_BOT_API_TOKEN=your_api_token_here
-
Build and run the bot:
go run main.go
Start the bot by sending the /start command. Greet the bot with /hello to receive a friendly response.
This project is configured and ready for deployment on Railway.
Contributions are welcome! If you have ideas for improvements or new features, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Thanks to the Telegram team for providing the Telegram Bot API. Telegram Bot API Documentation.
Author: hebobibun
Email: [email protected]
Feel free to reach out if you have any questions or feedback!