This is a simple Telegram bot written in Go using the gotgbot
library. The bot responds to the /start
command with a welcome message.
Template for future projects.
Active
- Go 1.22.5 or later
- Telegram bot token from BotFather
-
Clone the repository:
git clone https://github.com/Abishnoi69/go-telegram-bot.git cd go-telegram-bot
-
Install dependencies:
go mod tidy
-
Add your Telegram bot token to the
.env
file:cp sample.env .env && vi .env
-
Run the bot:
go run main.go
-
Start a chat with your bot on Telegram and send the
/start
command.
main.go
: Entry point. Initializes the bot and starts polling for updates.Telegram/modules/start.go
: Handler for the/start
command.Telegram/modules/loadModules.go
: Loads command handlers into the dispatcher.
Submit issues or pull requests for bugs or improvements.
Licensed under the MIT License.
- gotgbot for the library.
- Abishnoi69 for the template.
- Go for the language.