tg

package
v0.0.0-...-d8ed499 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

使用 config.GlobalConfig 初始化 bot

func MakeChan

func MakeChan()

func StartService

func StartService()

Types

type Bot

type Bot struct {
	*tgbotapi.BotAPI
	Chats map[int64]ChatChan
	// contains filtered or unexported fields
}

Bot 全局 Bot

var Instance *Bot

Instance Bot 实例

func (*Bot) NewChatChan

func (b *Bot) NewChatChan(chatid int64)

type ChatChan

type ChatChan struct {
	// contains filtered or unexported fields
}

func (ChatChan) Read

func (c ChatChan) Read() *message.Message

func (ChatChan) Write

func (c ChatChan) Write(msg *message.Message)

Jump to

Keyboard shortcuts

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