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 ¶ added in v1.2.0
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 ¶ added in v1.2.0
func (ctx *BasicClient) Clone(token string, dropUpdates bool, maxConnections int) error
func (*BasicClient) OnAnyEditedMessage ¶ added in v1.3.11
func (ctx *BasicClient) OnAnyEditedMessage(handler func(client *Client, update types.Message))
func (*BasicClient) OnAnyMessage ¶ added in v1.3.11
func (ctx *BasicClient) OnAnyMessage(handler func(client *Client, update types.Message))
func (*BasicClient) OnAnyMessageEvent ¶ added in v1.4.1
func (ctx *BasicClient) OnAnyMessageEvent(handler func(client *Client, update types.Message))
func (*BasicClient) OnCallbackQuery ¶ added in v1.2.0
func (ctx *BasicClient) OnCallbackQuery(handler func(client *Client, update types.CallbackQuery))
func (*BasicClient) OnChannelPost ¶ added in v1.2.0
func (ctx *BasicClient) OnChannelPost(handler func(client *Client, update types.Message))
func (*BasicClient) OnChatJoinRequest ¶ added in v1.2.0
func (ctx *BasicClient) OnChatJoinRequest(handler func(client *Client, update types.ChatJoinRequest))
func (*BasicClient) OnChatMember ¶ added in v1.2.0
func (ctx *BasicClient) OnChatMember(handler func(client *Client, update types.ChatMemberUpdated))
func (*BasicClient) OnChosenInlineResult ¶ added in v1.2.0
func (ctx *BasicClient) OnChosenInlineResult(handler func(client *Client, update types.ChosenInlineResult))
func (*BasicClient) OnEditedChannelPost ¶ added in v1.2.0
func (ctx *BasicClient) OnEditedChannelPost(handler func(client *Client, update types.Message))
func (*BasicClient) OnEditedMessage ¶ added in v1.2.0
func (ctx *BasicClient) OnEditedMessage(handler func(client *Client, update types.Message))
func (*BasicClient) OnInlineQuery ¶ added in v1.2.0
func (ctx *BasicClient) OnInlineQuery(handler func(client *Client, update types.InlineQuery))
func (*BasicClient) OnMessage ¶ added in v1.2.0
func (ctx *BasicClient) OnMessage(handler func(client *Client, update types.Message))
func (*BasicClient) OnMyChatMember ¶ added in v1.2.0
func (ctx *BasicClient) OnMyChatMember(handler func(client *Client, update types.ChatMemberUpdated))
func (*BasicClient) OnPoll ¶ added in v1.2.0
func (ctx *BasicClient) OnPoll(handler func(client *Client, update types.Poll))
func (*BasicClient) OnPollAnswer ¶ added in v1.2.0
func (ctx *BasicClient) OnPollAnswer(handler func(client *Client, update types.PollAnswer))
func (*BasicClient) OnPreCheckoutQuery ¶ added in v1.2.0
func (ctx *BasicClient) OnPreCheckoutQuery(handler func(client *Client, update types.PreCheckoutQuery))
func (*BasicClient) OnRawUpdate ¶ added in v1.2.0
func (ctx *BasicClient) OnRawUpdate(handler func(client *Client, update types.Update))
func (*BasicClient) OnShippingQuery ¶ added in v1.2.0
func (ctx *BasicClient) OnShippingQuery(handler func(client *Client, update types.ShippingQuery))
func (*BasicClient) SetupBotAPI ¶ added in v1.2.0
func (ctx *BasicClient) SetupBotAPI(hostName string, port int, https bool)
func (*BasicClient) Stop ¶ added in v1.2.0
func (ctx *BasicClient) Stop()
type Client ¶
type Client struct { *BasicClient Token string // contains filtered or unexported fields }
func (*Client) DownloadBytes ¶ added in v1.0.8
func (*Client) DownloadFile ¶ added in v1.0.8
func (ctx *Client) DownloadFile(fileId, filePath string, progress rawTypes.ProgressCallable) error
func (*Client) DownloadMedia ¶ added in v1.1.2
type Logger ¶ added in v1.3.0
type PollingClient ¶ added in v1.2.0
type PollingClient struct { *Client PollingTimeout time.Duration // contains filtered or unexported fields }
func NewClient ¶
func NewClient(token string) *PollingClient
func (*PollingClient) Run ¶ added in v1.2.0
func (ctx *PollingClient) Run() error
func (*PollingClient) Start ¶ added in v1.2.0
func (ctx *PollingClient) Start() error
type ServerConfig ¶ added in v1.2.0
type WebhookClient ¶ added in v1.2.0
type WebhookClient struct { *BasicClient WebhookConfig *WebhookConfig // contains filtered or unexported fields }
func NewWebhook ¶ added in v1.2.0
func NewWebhook(hostname string, port int) *WebhookClient
func NewWebhookWithCert ¶ added in v1.2.0
func NewWebhookWithCert(hostname string, port int, certFile, keyFile string) (*WebhookClient, error)
func (*WebhookClient) Run ¶ added in v1.2.0
func (ctx *WebhookClient) Run() error
func (*WebhookClient) Start ¶ added in v1.2.0
func (ctx *WebhookClient) Start() error
func (*WebhookClient) Stop ¶ added in v1.2.0
func (ctx *WebhookClient) Stop()
type WebhookConfig ¶ added in v1.2.0
type WebhookConfig struct { Config ServerConfig CertificateFile string KeyFile string // contains filtered or unexported fields }
func (*WebhookConfig) GetAddress ¶ added in v1.2.0
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.