bots

package
v0.10.13 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package bots is a lightweight wrapper over the "bots" methods in Slack's Web API: https://api.slack.com/methods?filter=bots.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Vars sdkservices.Vars
}

func (API) Info

func (a API) Info(ctx context.Context, args []sdktypes.Value, kwargs map[string]sdktypes.Value) (sdktypes.Value, error)

Info gets information about a bot user. Based on: https://api.slack.com/methods/bots.info. Required Slack app scopes: https://api.slack.com/scopes/users:read.

type Bot

type Bot struct {
	ID      string            `json:"id,omitempty"`
	Deleted bool              `json:"deleted,omitempty"`
	Name    string            `json:"name,omitempty"`
	Updated int               `json:"updated,omitempty"`
	AppID   string            `json:"app_id,omitempty"`
	UserID  string            `json:"user_id,omitempty"`
	Icons   map[string]string `json:"icons,omitempty"`
}

https://api.slack.com/methods/bots.info#examples

type InfoResponse

type InfoResponse struct {
	api.SlackResponse

	Bot Bot `json:"bot,omitempty"`
}

https://api.slack.com/methods/bots.info#examples

func InfoWithToken

func InfoWithToken(ctx context.Context, botToken string, authTest *auth.TestResponse) (*InfoResponse, error)

Info is only used internally, to check the usability of a bot token.

Jump to

Keyboard shortcuts

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