Update dependencies and build to go1.22 (#2113)
* Update dependencies and build to go1.22 * Fix api changes wrt to dependencies * Update golangci config
This commit is contained in:
19
vendor/github.com/slack-go/slack/bots.go
generated
vendored
19
vendor/github.com/slack-go/slack/bots.go
generated
vendored
@@ -35,19 +35,28 @@ func (api *Client) botRequest(ctx context.Context, path string, values url.Value
|
||||
return response, nil
|
||||
}
|
||||
|
||||
type GetBotInfoParameters struct {
|
||||
Bot string
|
||||
TeamID string
|
||||
}
|
||||
|
||||
// GetBotInfo will retrieve the complete bot information
|
||||
func (api *Client) GetBotInfo(bot string) (*Bot, error) {
|
||||
return api.GetBotInfoContext(context.Background(), bot)
|
||||
func (api *Client) GetBotInfo(parameters GetBotInfoParameters) (*Bot, error) {
|
||||
return api.GetBotInfoContext(context.Background(), parameters)
|
||||
}
|
||||
|
||||
// GetBotInfoContext will retrieve the complete bot information using a custom context
|
||||
func (api *Client) GetBotInfoContext(ctx context.Context, bot string) (*Bot, error) {
|
||||
func (api *Client) GetBotInfoContext(ctx context.Context, parameters GetBotInfoParameters) (*Bot, error) {
|
||||
values := url.Values{
|
||||
"token": {api.token},
|
||||
}
|
||||
|
||||
if bot != "" {
|
||||
values.Add("bot", bot)
|
||||
if parameters.Bot != "" {
|
||||
values.Add("bot", parameters.Bot)
|
||||
}
|
||||
|
||||
if parameters.TeamID != "" {
|
||||
values.Add("team_id", parameters.TeamID)
|
||||
}
|
||||
|
||||
response, err := api.botRequest(ctx, "bots.info", values)
|
||||
|
||||
Reference in New Issue
Block a user