bot

package
v0.0.0-...-fd0f6ac Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrUnknownCommand    = "Invalid Command"
	ErrInvalidPrompt     = "Invalid Prompt"
	ErrImagineTimeOut    = "Prompt timeout"
	ErrTranslationFailed = "Error when trying to translate"
)

Variables

This section is empty.

Functions

func GetPromptURL

func GetPromptURL(prompt string) (string, error)

func IsPrompt

func IsPrompt(text string) bool

Types

type Functions

type Functions interface {
	// contains filtered or unexported methods
}

type ResponseData

type ResponseData struct {
	Data struct {
		Translations []struct {
			TranslatedText string `json:"translatedText"`
		} `json:"translations"`
	} `json:"data"`
}

type TelegramBot

type TelegramBot struct {
	Functions
	// contains filtered or unexported fields
}

func NewTelegramBot

func NewTelegramBot(token, apikey string) *TelegramBot

func (*TelegramBot) Start

func (tb *TelegramBot) Start() error

Jump to

Keyboard shortcuts

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