Documentation ¶
Index ¶
- Constants
- Variables
- func NewAnimationUpload(chatid int64, file interface{}) tgbotapi.AnimationConfig
- func NewChatAction(chatid int64, action string) tgbotapi.ChatActionConfig
- func NewDocumentUpload(chatid int64, file interface{}) tgbotapi.DocumentConfig
- func NewFileBytes(filename string, fr io.Reader, size int64) tgbotapi.FileReader
- func NewFileConfig(fid string) tgbotapi.FileConfig
- func NewMessage(chatid int64, text string) tgbotapi.MessageConfig
- type Bot
- func (b *Bot) Done() <-chan struct{}
- func (b *Bot) NewPlugin(name string, f func(Message) <-chan bool, timeout time.Duration, opts []Opt)
- func (b *Bot) Printf(format string, v ...interface{})
- func (b *Bot) Println(v ...interface{})
- func (b *Bot) Run() (e error)
- func (b *Bot) Stop()
- func (b *Bot) WithCancel() (context.Context, func())
- func (b *Bot) WithTimeout(timeout time.Duration) (context.Context, func())
- type Config
- type Message
- type Opt
- type Plugin
- type Server
- type TLS
Constants ¶
View Source
const (
NAME = "kusoDD_bot"
)
Variables ¶
View Source
var (
LV = make(map[string]int)
)
Functions ¶
func NewAnimationUpload ¶
func NewAnimationUpload(chatid int64, file interface{}) tgbotapi.AnimationConfig
func NewChatAction ¶
func NewChatAction(chatid int64, action string) tgbotapi.ChatActionConfig
func NewDocumentUpload ¶
func NewDocumentUpload(chatid int64, file interface{}) tgbotapi.DocumentConfig
func NewFileBytes ¶
func NewFileConfig ¶
func NewFileConfig(fid string) tgbotapi.FileConfig
func NewMessage ¶
func NewMessage(chatid int64, text string) tgbotapi.MessageConfig
Types ¶
type Bot ¶
type Bot struct { Conf *Config Json jsoniter.API *tgbotapi.BotAPI // contains filtered or unexported fields }
func (*Bot) WithCancel ¶
type Config ¶
type Config struct { Token string `json:"token"` Server Server `json:"server"` Plugins map[string]map[string]interface{} `json:"plugins"` }
func ResolvConf ¶
type Message ¶
func (Message) CaptionCommand ¶
Click to show internal directories.
Click to hide internal directories.