Gotgproto - A helper package for Go Telegram Client, i.e. gotd/td

GoTGProto

GoTGProto is a helper package for gotd library, It aims to make td's raw functions easy-to-user with the help of features like using session strings, custom helper functions, storing peers and extracting chat or user ids through it etc.

You can use this package to create bots and userbots with Telegram MTProto easily in golang, for any futher help you can check out the documentations or reach us through the following:

  • Updates Channel: Channel
  • Support Chat: Chat

Go Reference GPLv3 license

Note: This library is in the beta stage yet and may not be stable for every case.

Installation

You can download the library with the help of standard go get command.

go get github.com/anonyindian/gotgproto

Usage

You can find various examples in the examples' directory, one of them i.e. authorizing as a user is as follows:

package main
import (
	"context"
	"github.com/anonyindian/gotgproto"
	"github.com/anonyindian/gotgproto/dispatcher"
	"github.com/anonyindian/gotgproto/sessionMaker"
	"github.com/gotd/td/telegram"
)
func main() {
    dp := dispatcher.MakeDispatcher()
    gotgproto.StartClient(gotgproto.ClientHelper{
		AppID: 1234567,
		ApiHash: "API_HASH_HERE",
		Session: sessionMaker.NewSession("session_name", sessionMaker.Session),
		Phone: "PHONE_NUMBER_HERE",
		Dispatcher: dp,
		TaskFunc: func(ctx context.Context, client *telegram.Client) error {
			return nil
		},
	})
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update examples as appropriate.

License

GPLv3
Licensed Under GNU General Public License v3

Owner
Anony
Hi๐Ÿ‘‹, I am Veer a.k.a. Anony and the universe is not so small ยฏ\_(ใƒ„)_/ยฏ
Anony
Similar Resources

Golang Based Account Generator Telegram Bot

Account Generator Bot Account Generator Bot, written in GoLang via gotgbot library. Variables Env Vars - BOT_TOKEN - Get it from @BotFather CHANNEL_ID

Nov 21, 2022

Full-native go implementation of Telegram API

Full-native go implementation of Telegram API

MTProto Full-native implementation of MTProto protocol on Golang! english ั€ัƒััะบะธะน ็ฎ€ไฝ“ไธญๆ–‡ Features Full native implementation All code, from sending requ

Jan 1, 2023

Bot that polls activity API for Github organisation and pushes updates to Telegram.

git-telegram-bot Telegram bot for notifying org events Requirements (for building) Go version 1.16.x Setup If you don't have a telegram bot token yet,

Apr 8, 2022

The command line utility for Telegram

cli The command line interface for telegram. $ go install github.com/gotd/cli/cmd/tg@latest Usage First, initialize configuration (currently only for

Dec 21, 2022

๐Ÿ“ฑ Hentai bot for Telegram ๐Ÿ“ฑ

๐Ÿ“ฑ Hentai bot for Telegram ๐Ÿ“ฑ

Random-Good-Hanime Hentai Telegram bot for educational purpose ๐Ÿ˜‰ Features ๐Ÿ“ฐ Random hentai Lot of different categories ๐Ÿ˜‹ Real time logs ๐Ÿ“œ Config fi

Nov 25, 2022

lightning - forward messages between a qq group and a telegram group

lightning The purpose of this project is to forward messages between a qq group and a telegram group. Getting Started Clone this project: git clone ht

Nov 9, 2022

A telegram bot that fetches multiple RSS cryptocurrency news feeds for sentiment analysis

Crypto News Telegram Bot A simple telegram bot that will help you stay updated on your latest crypto news This bot will help you keep track of the lat

Aug 22, 2021

A Telegram bot that will run code for you.

piston_bot A Telegram bot that will run code for you. Made using piston. Available as @iruncode_bot on telegram. Examples Basic example Input: /run py

Sep 11, 2022

Telegram bot to get information on vaccine availabilities.

๐Ÿ’‰ berlin-vaccine-alert Telegram bot to get information on vaccine availabilities. Get the latest appointments directly on telegram. The bot listen to

Jun 23, 2022
Comments
  • Fix chat_type check for `types.EffectiveChat`.`(*types.Chat)`

    Fix chat_type check for `types.EffectiveChat`.`(*types.Chat)`

    • Here the value should be false since it is a chat in line 142. https://github.com/anonyindian/gotgproto/blob/191c68cf73cf1e0c4317b3e4d8c252907d6ea6cb/types/chat.go#L141-L143

    • Here the value should be true since it is a chat in line 147. https://github.com/anonyindian/gotgproto/blob/191c68cf73cf1e0c4317b3e4d8c252907d6ea6cb/types/chat.go#L146-L148

  • Add mention helpers in parsemodes

    Add mention helpers in parsemodes

    Add helpers in entityhelpers and stylinghelpers from the parsemode package to mention users with their usernames or user ids using telegram's deeplinks. To Mention With User ID: tg://user?id= To Mention With User ID: tg://resolve?domain=

  • invalid memory address or nil pointer dereference - Test with example echo_bot/main.go

    invalid memory address or nil pointer dereference - Test with example echo_bot/main.go

    I'm having this output trying to run the example of echo_bot. macOs 13.0 go version go1.19.3 darwin/amd64

    First time bot asked for code, I logged in and receive that user start, but when I type some and send from a contact to the tg user i'm using as bot i'm receiving this output...

    Screenshot 2022-11-17 at 19 10 14
Dlercloud-telegram-bot - A Telegram bot for managing your Dler Cloud account

Dler Cloud Telegram Bot A Telegram bot for managing your Dler Cloud account. Usa

Dec 30, 2021
Pro-bot - A telegram bot to play around with the community telegram channels

pro-bot ?? Pro Bot A Telegram Bot to Play Around With The Community Telegram Cha

Jan 24, 2022
Client lib for Telegram bot api

Micha Client lib for Telegram bot api. Supports Bot API v2.3.1 (of 4th Dec 2016). Simple echo bot example: package main import ( "log" "git

Nov 10, 2022
Library for working with golang telegram client + bot based on tdlib. This library was taken from the user Arman92 and changed for the current version of tdlib.

go-tdlib Golang Telegram TdLib JSON bindings Install To install, you need to run inside a docker container (it is given below) go get -u github.com/ka

Dec 2, 2022
IRC, Slack, Telegram and RocketChat bot written in go
IRC, Slack, Telegram and RocketChat bot written in go

go-bot IRC, Slack & Telegram bot written in Go using go-ircevent for IRC connectivity, nlopes/slack for Slack and Syfaro/telegram-bot-api for Telegram

Dec 20, 2022
Golang telegram bot API wrapper, session-based router and middleware

go-tgbot Pure Golang telegram bot API wrapper generated from swagger definition, session-based routing and middlewares. Usage benefits No need to lear

Nov 16, 2022
Telegram Bot Framework for Go

Margelet Telegram Bot Framework for Go is based on telegram-bot-api It uses Redis to store it's states, configs and so on. Any low-level interactions

Dec 22, 2022
Go library for Telegram Bot API
Go library for Telegram Bot API

tbot - Telegram Bot Server Features Full Telegram Bot API 4.7 support Zero dependency Type-safe API client with functional options Capture messages by

Nov 30, 2022
Telebot is a Telegram bot framework in Go.

Telebot "I never knew creating Telegram bots could be so sexy!" go get -u gopkg.in/tucnak/telebot.v2 Overview Getting Started Poller Commands Files Se

Dec 30, 2022
Golang bindings for the Telegram Bot API

Golang bindings for the Telegram Bot API All methods are fairly self explanatory, and reading the godoc page should explain everything. If something i

Jan 6, 2023