Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 1.31 KB

README.md

File metadata and controls

60 lines (41 loc) · 1.31 KB

Go Telegram Bot

This is a simple Telegram bot written in Go using the gotgbot library. The bot responds to the /start command with a welcome message.

Features

Template for future projects.

Status

Active

Prerequisites

  • Go 1.22.5 or later
  • Telegram bot token from BotFather

Installation

  1. Clone the repository:

    git clone https://github.com/Abishnoi69/go-telegram-bot.git
    cd go-telegram-bot
  2. Install dependencies:

    go mod tidy
  3. Add your Telegram bot token to the .env file:

    cp sample.env .env && vi .env

Usage

  1. Run the bot:

    go run main.go
  2. Start a chat with your bot on Telegram and send the /start command.

Project Structure

  • 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.

Contributing

Submit issues or pull requests for bugs or improvements.

License

Licensed under the MIT License.

Thanks