Skip to content

Commit 3c3bff0

Browse files
authored
Update the slash command listener documents (#809)
1 parent 39de1ab commit 3c3bff0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/guides/bolt-basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ app.command("/hello", (req, ctx) -> {
144144
});
145145
```
146146

147-
For [**chat.postMessage**](https://api.slack.com/methods/chat.postMessage) API calls with the given channel ID, using `say()` utility is much simpler.
147+
For [**chat.postMessage**](https://api.slack.com/methods/chat.postMessage) API calls with the given channel ID, using `say()` utility is much simpler. If your slash command needs to be available anywhere, using `ctx.respond` would be more robust as `say()` method does not work for the conversations where the app's bot user is not a member of (e.g., a person's own DM).
148148

149149
```java
150150
app.command("/hello", (req, ctx) -> {

docs/guides/ja/bolt-basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ app.command("/hello", (req, ctx) -> {
144144
});
145145
```
146146

147-
ちなみにペイロードに含まれているチャンネル ID を用いた [**chat.postMessage**](https://api.slack.com/methods/chat.postMessage) API の呼び出しに限っては `say()` というユーティリティメソッドを使えば、より簡単になります。
147+
ちなみにペイロードに含まれているチャンネル ID を用いた [**chat.postMessage**](https://api.slack.com/methods/chat.postMessage) API の呼び出しに限っては `say()` というユーティリティメソッドを使えば、より簡単になります。もし、あらゆる場所でこのスラッシュコマンドを使えるようにしたい場合は `ctx.respond` を使う方が安全でしょう。`say()` は、あなたのアプリのボットユーザーがメンバーではない会話(例:個人の DM)では使用することができないためです。
148148

149149
```java
150150
app.command("/hello", (req, ctx) -> {

0 commit comments

Comments
 (0)