Skip to content

Gogram

Modern Golang MTProto Framework

A powerful, elegant, and concurrent Telegram API framework built for Go developers.

Gogram

Quick Start

bash
go get -u github.com/amarnathcjd/gogram/telegram
go
package main

import "github.com/amarnathcjd/gogram/telegram"

func main() {
    client, err := telegram.NewClient(telegram.ClientConfig{
        AppID: 6, AppHash: "<app-hash>",
    })
    if err != nil {
        log.Fatal(err)
    }

    client.Conn()
    client.LoginBot("<bot-token>")

    client.On(telegram.OnMessage, func(message *telegram.NewMessage) error {
        message.Reply("Hello from Gogram!")
        return nil
    }, telegram.FilterPrivate)

    client.Idle()
}

Support Development

Help make Gogram better:

Community

Released under the GPL-3.0 License.