Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the documents to use respond over say in response to slash commands #1059

Merged
merged 1 commit into from
Aug 11, 2021
Merged
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
2 changes: 1 addition & 1 deletion docs/_advanced/context.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function addTimezoneContext({ payload, client, context, next }) {
await next();
}

app.command('request', addTimezoneContext, async ({ command, ack, client, context }) => {
app.command('/request', addTimezoneContext, async ({ command, ack, client, context }) => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for consistency

// Acknowledge command request
await ack();
// Get local hour of request
Expand Down
2 changes: 1 addition & 1 deletion docs/_advanced/ja_context.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function addTimezoneContext({ payload, client, context, next }) {
await next();
}

app.command('request', addTimezoneContext, async ({ command, ack, client, context }) => {
app.command('/request', addTimezoneContext, async ({ command, ack, client, context }) => {
// コマンドリクエストの確認
await ack();
// リクエスト時のローカル時間を取得
Expand Down
4 changes: 2 additions & 2 deletions docs/_basic/ja_listening_responding_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Slack アプリの管理画面でスラッシュコマンドを設定すると

```javascript
// この echo コマンドは ただ、その引数を(やまびこのように)おうむ返しする
app.command('/echo', async ({ command, ack, say }) => {
app.command('/echo', async ({ command, ack, respond }) => {
// コマンドリクエストを確認
await ack();

await say(`${command.text}`);
await respond(`${command.text}`);
});
```
4 changes: 2 additions & 2 deletions docs/_basic/listening_responding_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ When configuring commands within your app configuration, you'll continue to appe

```javascript
// The echo command simply echoes on command
app.command('/echo', async ({ command, ack, say }) => {
app.command('/echo', async ({ command, ack, respond }) => {
// Acknowledge command request
await ack();

await say(`${command.text}`);
await respond(`${command.text}`);
});
```