Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions methods/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ $ slack run chat_post_message.py # Make the request
- **[slackbot.skillSets.library.add](https://docs.slack.dev/reference/methods/slackbot.skillSets.library.add)**: Adds a Slackbot skill set to the caller's library. [Implementation](./src/slackbot/skillSets/library/slackbot_skill_sets_library_add.py).
- **[slackbot.skillSets.library.remove](https://docs.slack.dev/reference/methods/slackbot.skillSets.library.remove)**: Removes a Slackbot skill set from the caller's library. [Implementation](./src/slackbot/skillSets/library/slackbot_skill_sets_library_remove.py).
- **[slackbot.skillSets.list](https://docs.slack.dev/reference/methods/slackbot.skillSets.list)**: Lists Slackbot skill sets from the caller's point of view. The skills in each set are not included. [Implementation](./src/slackbot/skillSets/slackbot_skill_sets_list.py).
- **[slackbot.skillSets.update](https://docs.slack.dev/reference/methods/slackbot.skillSets.update)**: Changes a Slackbot skill set's display name or description. [Implementation](./src/slackbot/skillSets/slackbot_skill_sets_update.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).
Expand Down
19 changes: 19 additions & 0 deletions methods/src/slackbot/skillSets/slackbot_skill_sets_update.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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.update method
response = client.slackbot_skillSets_update(
skill_set_id="F0789IJKL",
display_name="Sales toolkit",
description="Skills for preparing customer calls, writing proposals, and following up on deals.",
)

# Inspect the response
print(response)
Loading