Skip to content

AshokShau/go-telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

My go telegram bot's template using gotgbot.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages