Files
picoclaw/docs/channels/slack/README.ja.md
T
Cytown 667fc85d54 refactor(config): make config.Channel to multiple instance support
add new field type to Channel struct
config.channels refactor to channel_list
update config version to 3
update the docs
2026-04-13 22:21:21 +08:00

37 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
> [README](../../../README.ja.md) に戻る
# Slack
Slack は世界をリードする企業向けインスタントメッセージングプラットフォームです。PicoClaw は Slack の Socket Mode を使用してリアルタイムの双方向通信を実現しており、公開 Webhook エンドポイントの設定は不要です。
## 設定
```json
{
"channel_list": {
"slack": {
"enabled": true,
"type": "slack",
"bot_token": "xoxb-...",
"app_token": "xapp-...",
"allow_from": []
}
}
}
```
| フィールド | 型 | 必須 | 説明 |
| ---------- | ------ | ------ | ------------------------------------------------------------------------ |
| enabled | bool | はい | Slack チャンネルを有効にするかどうか |
| bot_token | string | はい | Slack ボットの Bot User OAuth Tokenxoxb- で始まる) |
| app_token | string | はい | Slack アプリの Socket Mode App Level Tokenxapp- で始まる) |
| allow_from | array | いいえ | ユーザーIDのホワイトリスト。空の場合は全ユーザーを許可 |
## セットアップ手順
1. [Slack API](https://api.slack.com/) にアクセスして新しい Slack アプリを作成する
2. Socket Mode を有効にして App Level Token を取得する
3. Bot Token Scopes を追加する(例: `chat:write``im:history` など)
4. アプリをワークスペースにインストールして Bot User OAuth Token を取得する
5. Bot Token と App Token を設定ファイルに入力する