Skip to content

PB-Digital/go-telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-telegram

Test Status

go-telegram is a Go client library for accessing the Telegram API.

Installation

go-telegram is compatible with modern Go releases in module mode, with Go installed:

go get github.com/PB-Digital/go-telegram

will resolve and add the package to the current development module, along with its dependencies.

Alternatively the same can be achieved if you use import in a package:

import "github.com/PB-Digital/go-telegram"

Usage

import "github.com/PB-Digital/go-telegram"

Construct a new Telegram client, then use the various services on the client to access different parts of the Telegram API.

For example:

client := telegram.NewClient("TELEGRAM_BOT_TOKEN")

// send plain message to Telegram channel or group
client.SendMessage(telegram.Message{
    ChatId:    "TELEGRAM_GROUP_OR_CHANNEL_ID",
    Body:      "Hello there!",
})

For more sample code snippets, head over to the example directory.

License

This library is licensed under the MIT License. See LICENSE for the full license text.

About

Go client library for accessing the Telegram API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages