Documentation ¶
Index ¶
- type ChatID
- type GoTgBot
- func (g *GoTgBot) BanSenderChat(chat *telebot.Chat, sender telebot.Recipient) error
- func (g *GoTgBot) CreateMiddleware(...) telebot.MiddlewareFunc
- func (g *GoTgBot) CreateMyAccountCommand(commandText string)
- func (g *GoTgBot) CreateWebAppStartCommand(menuButtonText string)
- func (g *GoTgBot) GetBot() *telebot.Bot
- func (g *GoTgBot) GetConfig() *TelegramBot
- func (g *GoTgBot) Handle(endpoint interface{}, h telebot.HandlerFunc, m ...telebot.MiddlewareFunc)
- func (g *GoTgBot) ReplyMarkup() *telebot.ReplyMarkup
- func (g *GoTgBot) Send(to telebot.Recipient, what interface{}, opts ...interface{}) (*telebot.Message, error)
- func (g *GoTgBot) SendAlbum(to telebot.Recipient, a telebot.Album, opts ...interface{}) ([]telebot.Message, error)
- func (g *GoTgBot) SendFromDiskAudios(to telebot.Recipient, fromDiskFiles []string) ([]telebot.Message, error)
- func (g *GoTgBot) SendFromDiskPhotos(to telebot.Recipient, fromDiskFiles []string) ([]telebot.Message, error)
- func (g *GoTgBot) SendFromDiskVideos(to telebot.Recipient, fromDiskFiles []string) ([]telebot.Message, error)
- func (g *GoTgBot) SendFromUrlAudios(to telebot.Recipient, urls []string) ([]telebot.Message, error)
- func (g *GoTgBot) SendFromUrlPhotos(to telebot.Recipient, urls []string) ([]telebot.Message, error)
- func (g *GoTgBot) SendFromUrlVideos(to telebot.Recipient, urls []string) ([]telebot.Message, error)
- func (g *GoTgBot) SendMsgText(chatId int64, msg string, opts ...interface{}) (*telebot.Message, error)
- func (g *GoTgBot) StartBot()
- func (g *GoTgBot) StopBot()
- func (g *GoTgBot) Use(middleware ...telebot.MiddlewareFunc)
- func (g *GoTgBot) UseMiddleware(...)
- type GoTgBots
- type TelegramBot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoTgBot ¶
type GoTgBot struct {
// contains filtered or unexported fields
}
func (*GoTgBot) BanSenderChat ¶
func (*GoTgBot) CreateMiddleware ¶
func (*GoTgBot) CreateMyAccountCommand ¶ added in v1.2.14
func (*GoTgBot) CreateWebAppStartCommand ¶ added in v1.2.14
/start
func (*GoTgBot) GetConfig ¶
func (g *GoTgBot) GetConfig() *TelegramBot
func (*GoTgBot) Handle ¶
func (g *GoTgBot) Handle(endpoint interface{}, h telebot.HandlerFunc, m ...telebot.MiddlewareFunc)
func (*GoTgBot) ReplyMarkup ¶
func (g *GoTgBot) ReplyMarkup() *telebot.ReplyMarkup
func (*GoTgBot) SendFromDiskAudios ¶
func (*GoTgBot) SendFromDiskPhotos ¶
func (*GoTgBot) SendFromDiskVideos ¶
func (*GoTgBot) SendFromUrlAudios ¶
func (*GoTgBot) SendFromUrlPhotos ¶
func (*GoTgBot) SendFromUrlVideos ¶
func (*GoTgBot) SendMsgText ¶
type GoTgBots ¶
type GoTgBots struct {
// contains filtered or unexported fields
}
func (*GoTgBots) CreateBot ¶
func (g *GoTgBots) CreateBot(config *TelegramBot) (*GoTgBot, error)
同一个产品只会存在一个,后一个添加的覆盖前面添加
func (*GoTgBots) DestroyBot ¶
type TelegramBot ¶
type TelegramBot struct { Product string `yaml:"Product" json:"product"` Token string `yaml:"Token" json:"token"` WebAppUrl string `yaml:"WebAppUrl,optional" json:"webAppUrl,optional"` StartReply string `yaml:"StartReply" json:"startReply,optional"` Timeout int `yaml:"Timeout,optional" json:"timeout,optional"` //s Open bool `yaml:"Open,optional" json:"open,optional"` //是否开启 }
Click to show internal directories.
Click to hide internal directories.