tg

package
v0.0.0-...-34f79f7 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

This file is part of manifold. Manifold is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Manifold is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with manifold. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUserName

func GetUserName(user tele.User) string

Types

type ComparisonOutg

type ComparisonOutg struct {
	Local  id.Id
	Puppet int
}

type IdComparisonInc

type IdComparisonInc struct {
	Tg    int64
	Local id.Id
}

type Puppet

type Puppet = tele.Bot

type PuppetConfig

type PuppetConfig struct {
	Token string
}

type TgUnit

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

func NewTgUnit

func NewTgUnit(config TgUnitConfig) TgUnit

func (*TgUnit) Bot

func (t *TgUnit) Bot(local id.Id) *tele.Bot

func (*TgUnit) GetIncId

func (t *TgUnit) GetIncId(tgid int64) (id.Id, error)

func (*TgUnit) Header

func (t *TgUnit) Header(msg events.MsgEvent) string

func (*TgUnit) Init

func (t *TgUnit) Init(ucontext *units.UnitContext) error

func (*TgUnit) Run

func (t *TgUnit) Run(group *errgroup.Group, ctx context.Context) error

func (*TgUnit) Stop

func (t *TgUnit) Stop() error

type TgUnitConfig

type TgUnitConfig struct {
	Token     string
	ChatId    int64
	UsersInc  []IdComparisonInc
	Puppet    []PuppetConfig
	UsersOutg []ComparisonOutg
}

Jump to

Keyboard shortcuts

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