slack-go/slack

Implement the optional argument of teamID for DND api calls

notxarb opened this issue · 0 comments

Description

Implement the optional argument of teamID in the DND API calls.

The company I work for recently migrated slack channels from several workspaces to a single workspace.
A bot that was functioning on an old workspace stopped working, and started logging an error when it was trying to get DND info for users. The error is missing_argument, which doesn't help much.

Using the online api tester, I was able to reproduce the error when using the new token. The full response is:

{
    "ok": false,
    "error": "missing_argument",
    "arg": "team_id"
}

According to that, I would need to be able to supply the team_id, which this library doesn't allow at this time.

If I run the api test with the teamID provided, it works how I would expect it to.

(Optional) Slack's documentation

https://api.slack.com/methods/dnd.info