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 @@ -74,6 +74,7 @@ $ slack run chat_post_message.py # Make the request
- **[slackbot.skillSets.info](https://docs.slack.dev/reference/methods/slackbot.skillSets.info)**: Returns one Slackbot skill set and the skills in it, in display order. [Implementation](./src/slackbot/skillSets/slackbot_skill_sets_info.py).
- **[slackbot.skillSets.items.add](https://docs.slack.dev/reference/methods/slackbot.skillSets.items.add)**: Adds skills to a Slackbot skill set. [Implementation](./src/slackbot/skillSets/items/slackbot_skill_sets_items_add.py).
- **[slackbot.skillSets.items.remove](https://docs.slack.dev/reference/methods/slackbot.skillSets.items.remove)**: Removes skills from a Slackbot skill set. [Implementation](./src/slackbot/skillSets/items/slackbot_skill_sets_items_remove.py).
- **[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.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
2 changes: 2 additions & 0 deletions methods/src/slackbot/skillSets/library/.slack/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apps.dev.json
cache/
6 changes: 6 additions & 0 deletions methods/src/slackbot/skillSets/library/.slack/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"manifest": {
"source": "local"
},
"project_id": "00000000-0000-0000-0000-000000000000"
}
5 changes: 5 additions & 0 deletions methods/src/slackbot/skillSets/library/.slack/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"get-hooks": "python3 -m slack_cli_hooks.hooks.get_hooks"
}
}
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions methods/src/slackbot/skillSets/library/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"display_information": {
"name": "Slack API Methods",
"description": "Example implementations to call \"slackbot.skillSets.library\" methods"
},
"features": {
"bot_user": {
"display_name": "Slack API Methods",
"always_online": true
}
},
"oauth_config": {
"scopes": {
"bot": ["skills:write"]
}
},
"settings": {
"org_deploy_enabled": true,
"socket_mode_enabled": false,
"token_rotation_enabled": false
}
}
Original file line number Diff line number Diff line change
@@ -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.library.add method
response = client.slackbot_skillSets_library_add(
skill_set_id="F0789IJKL",
)

# Inspect the response
print(response)
Loading