tgquestions

package module
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2022 License: MIT Imports: 5 Imported by: 0

README

go-telegram-bot-api-questions

Library to deal with questions and answers in go-telegram-bot

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolQuestionConfig

type BoolQuestionConfig struct {
	ID             int64
	Question       string
	TextTrue       string
	TextFalse      string
	TextAfterClick string
	CallbackTrue   func()
	CallbackFalse  func()
}

type Config

type Config struct {
	RistrettoConfig *ristretto.Config
	Bot             *tgbotapi.BotAPI
}

type QuestionConfig

type QuestionConfig struct {
	ID       int64
	Question string
	Result   chan string
	Callback func()

	DoubleCheck          bool
	DoubleCheckQuestion  string
	DoubleCheckButtonYes string
	DoubleCheckButtonNo  string
	// contains filtered or unexported fields
}

type TGQ

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

func Init

func Init(c Config) (*TGQ, error)

func (*TGQ) DoBoolQuestion

func (tgq *TGQ) DoBoolQuestion(qc BoolQuestionConfig)

func (*TGQ) DoQuestion

func (tgq *TGQ) DoQuestion(qc QuestionConfig) error

func (*TGQ) Update

func (tgq *TGQ) Update(update tgbotapi.Update) bool

Jump to

Keyboard shortcuts

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