diff --git a/methods/README.md b/methods/README.md index 346cc8d..822a60e 100644 --- a/methods/README.md +++ b/methods/README.md @@ -70,6 +70,7 @@ $ slack run chat_post_message.py # Make the request ### slackbot - **[slackbot.skillSets.create](https://docs.slack.dev/reference/methods/slackbot.skillSets.create)**: Creates an empty, private Slackbot skill set and attempts to add it to the caller's library. [Implementation](./src/slackbot/skillSets/slackbot_skill_sets_create.py). +- **[slackbot.skillSets.delete](https://docs.slack.dev/reference/methods/slackbot.skillSets.delete)**: Deletes a Slackbot skill set. The skills in it, and their library entries, are kept. [Implementation](./src/slackbot/skillSets/slackbot_skill_sets_delete.py). - **[slackbot.skills.create](https://docs.slack.dev/reference/methods/slackbot.skills.create)**: Creates a skill from markdown instructions, or turns an existing canvas the caller owns into a skill. [Implementation](./src/slackbot/skills/slackbot_skills_create.py). - **[slackbot.skills.delete](https://docs.slack.dev/reference/methods/slackbot.skills.delete)**: Deletes a Slackbot skill and its canvas, and removes it from every library, skill set, and the org catalog. [Implementation](./src/slackbot/skills/slackbot_skills_delete.py). - **[slackbot.skills.info](https://docs.slack.dev/reference/methods/slackbot.skills.info)**: Returns one Slackbot skill, including its instructions. [Implementation](./src/slackbot/skills/slackbot_skills_info.py). diff --git a/methods/src/slackbot/skillSets/slackbot_skill_sets_delete.py b/methods/src/slackbot/skillSets/slackbot_skill_sets_delete.py new file mode 100644 index 0000000..e5b4b25 --- /dev/null +++ b/methods/src/slackbot/skillSets/slackbot_skill_sets_delete.py @@ -0,0 +1,17 @@ +import os + +from slack_sdk import WebClient + +# Read a token from an environment variable +token = os.environ.get("SLACK_TOKEN") + +# Initialize +client = WebClient(token=token) + +# Call the slackbot.skillSets.delete method +response = client.slackbot_skillSets_delete( + skill_set_id="F0789IJKL", +) + +# Inspect the response +print(response)