Documentation ¶
Index ¶
- func Idle()
- type BasicClient
- func (ctx *BasicClient) Clone(token string, dropUpdates bool, maxConnections int) error
- func (ctx *BasicClient) OnAnyEditedMessage(handler func(client *Client, update types.Message))
- func (ctx *BasicClient) OnAnyMessage(handler func(client *Client, update types.Message))
- func (ctx *BasicClient) OnAnyMessageEvent(handler func(client *Client, update types.Message))
- func (ctx *BasicClient) OnCallbackQuery(handler func(client *Client, update types.CallbackQuery))
- func (ctx *BasicClient) OnChannelPost(handler func(client *Client, update types.Message))
- func (ctx *BasicClient) OnChatJoinRequest(handler func(client *Client, update types.ChatJoinRequest))
- func (ctx *BasicClient) OnChatMember(handler func(client *Client, update types.ChatMemberUpdated))
- func (ctx *BasicClient) OnChosenInlineResult(handler func(client *Client, update types.ChosenInlineResult))
- func (ctx *BasicClient) OnEditedChannelPost(handler func(client *Client, update types.Message))
- func (ctx *BasicClient) OnEditedMessage(handler func(client *Client, update types.Message))
- func (ctx *BasicClient) OnInlineQuery(handler func(client *Client, update types.InlineQuery))
- func (ctx *BasicClient) OnMessage(handler func(client *Client, update types.Message))
- func (ctx *BasicClient) OnMyChatMember(handler func(client *Client, update types.ChatMemberUpdated))
- func (ctx *BasicClient) OnPoll(handler func(client *Client, update types.Poll))
- func (ctx *BasicClient) OnPollAnswer(handler func(client *Client, update types.PollAnswer))
- func (ctx *BasicClient) OnPreCheckoutQuery(handler func(client *Client, update types.PreCheckoutQuery))
- func (ctx *BasicClient) OnRawUpdate(handler func(client *Client, update types.Update))
- func (ctx *BasicClient) OnShippingQuery(handler func(client *Client, update types.ShippingQuery))
- func (ctx *BasicClient) SetupBotAPI(hostName string, port int, https bool)
- func (ctx *BasicClient) Stop()
- type Client
- func (ctx *Client) DownloadBytes(fileId string, progress rawTypes.ProgressCallable) ([]byte, error)
- func (ctx *Client) DownloadFile(fileId, filePath string, progress rawTypes.ProgressCallable) error
- func (ctx *Client) DownloadMedia(message types.Message, filePath string, progress rawTypes.ProgressCallable) error
- func (ctx *Client) Invoke(method rawTypes.Method) (*rawTypes.Result, error)
- func (ctx *Client) IsRunning() bool
- func (ctx *Client) Self() types.User
- type Config
- type Logger
- type PollingClient
- type ServerConfig
- type WebhookClient
- type WebhookConfig
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasicClient ¶
type BasicClient struct { BotApiConfig Config NoUpdates bool DownloadRefreshRate time.Duration AllowedUpdates []string Beta bool SleepThreshold int MaxGoRoutines int LoggingLevel logger.LogLevel LoggerColorful bool LoggerWriter Writer AntiFloodData map[int64]*rawTypes.AntiFloodData // contains filtered or unexported fields }
func (*BasicClient) Clone ¶
func (ctx *BasicClient) Clone(token string, dropUpdates bool, maxConnections int) error
func (*BasicClient) OnAnyEditedMessage ¶
func (ctx *BasicClient) OnAnyEditedMessage(handler func(client *Client, update types.Message))
func (*BasicClient) OnAnyMessage ¶
func (ctx *BasicClient) OnAnyMessage(handler func(client *Client, update types.Message))
func (*BasicClient) OnAnyMessageEvent ¶
func (ctx *BasicClient) OnAnyMessageEvent(handler func(client *Client, update types.Message))
func (*BasicClient) OnCallbackQuery ¶
func (ctx *BasicClient) OnCallbackQuery(handler func(client *Client, update types.CallbackQuery))
func (*BasicClient) OnChannelPost ¶
func (ctx *BasicClient) OnChannelPost(handler func(client *Client, update types.Message))
func (*BasicClient) OnChatJoinRequest ¶
func (ctx *BasicClient) OnChatJoinRequest(handler func(client *Client, update types.ChatJoinRequest))
func (*BasicClient) OnChatMember ¶
func (ctx *BasicClient) OnChatMember(handler func(client *Client, update types.ChatMemberUpdated))
func (*BasicClient) OnChosenInlineResult ¶
func (ctx *BasicClient) OnChosenInlineResult(handler func(client *Client, update types.ChosenInlineResult))
func (*BasicClient) OnEditedChannelPost ¶
func (ctx *BasicClient) OnEditedChannelPost(handler func(client *Client, update types.Message))
func (*BasicClient) OnEditedMessage ¶
func (ctx *BasicClient) OnEditedMessage(handler func(client *Client, update types.Message))
func (*BasicClient) OnInlineQuery ¶
func (ctx *BasicClient) OnInlineQuery(handler func(client *Client, update types.InlineQuery))
func (*BasicClient) OnMessage ¶
func (ctx *BasicClient) OnMessage(handler func(client *Client, update types.Message))
func (*BasicClient) OnMyChatMember ¶
func (ctx *BasicClient) OnMyChatMember(handler func(client *Client, update types.ChatMemberUpdated))
func (*BasicClient) OnPoll ¶
func (ctx *BasicClient) OnPoll(handler func(client *Client, update types.Poll))
func (*BasicClient) OnPollAnswer ¶
func (ctx *BasicClient) OnPollAnswer(handler func(client *Client, update types.PollAnswer))
func (*BasicClient) OnPreCheckoutQuery ¶
func (ctx *BasicClient) OnPreCheckoutQuery(handler func(client *Client, update types.PreCheckoutQuery))
func (*BasicClient) OnRawUpdate ¶
func (ctx *BasicClient) OnRawUpdate(handler func(client *Client, update types.Update))
func (*BasicClient) OnShippingQuery ¶
func (ctx *BasicClient) OnShippingQuery(handler func(client *Client, update types.ShippingQuery))
func (*BasicClient) SetupBotAPI ¶
func (ctx *BasicClient) SetupBotAPI(hostName string, port int, https bool)
func (*BasicClient) Stop ¶
func (ctx *BasicClient) Stop()
type Client ¶
type Client struct { *BasicClient Token string // contains filtered or unexported fields }
func (*Client) DownloadBytes ¶
func (*Client) DownloadFile ¶
func (ctx *Client) DownloadFile(fileId, filePath string, progress rawTypes.ProgressCallable) error
func (*Client) DownloadMedia ¶
type Logger ¶
type PollingClient ¶
type PollingClient struct { *Client PollingTimeout time.Duration // contains filtered or unexported fields }
func NewClient ¶
func NewClient(token string) *PollingClient
func (*PollingClient) Run ¶
func (ctx *PollingClient) Run() error
func (*PollingClient) Start ¶
func (ctx *PollingClient) Start() error
type ServerConfig ¶
type WebhookClient ¶
type WebhookClient struct { *BasicClient WebhookConfig *WebhookConfig // contains filtered or unexported fields }
func NewWebhook ¶
func NewWebhook(hostname string, port int) *WebhookClient
func NewWebhookWithCert ¶
func NewWebhookWithCert(hostname string, port int, certFile, keyFile string) (*WebhookClient, error)
func (*WebhookClient) Run ¶
func (ctx *WebhookClient) Run() error
func (*WebhookClient) Start ¶
func (ctx *WebhookClient) Start() error
func (*WebhookClient) Stop ¶
func (ctx *WebhookClient) Stop()
type WebhookConfig ¶
type WebhookConfig struct { Config ServerConfig CertificateFile string KeyFile string // contains filtered or unexported fields }
func (*WebhookConfig) GetAddress ¶
func (ctx *WebhookConfig) GetAddress() string
Source Files ¶
- clients.go
- clone.go
- config.go
- download_bytes.go
- download_file.go
- download_media.go
- execute_request.go
- handle_update.go
- idle.go
- invoke.go
- is_running.go
- listeners.go
- logger.go
- raw_listeners.go
- run.go
- self.go
- server_config.go
- setup.go
- setup_botapi.go
- show_notice.go
- start_polling.go
- start_webhook.go
- stop.go
- type.go
- webhook_config.go
Click to show internal directories.
Click to hide internal directories.