tgbot

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 4 Imported by: 0

README

go-tgbot

简介

封装了一个快速对接Telegram机器人的客户端

准备事项

  1. 准备好Tgbot的Token,如还未注册,请到Telegram注册
  2. 国内环境的话,准备好代理链接

快速开始

go get github.com/iwinston/go-tgbot
  1. 初始化客户端

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Init

func Init(proxyUrl, botToken string)

func ListenUpdates

func ListenUpdates(handle func(update tgbotapi.Update)) error

func NewClient

func NewClient(proxyUrl, botToken string) (*tgbotapi.BotAPI, error)

func Send

func Send(target int64, message string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL