Skip to content

Commit

Permalink
Merge pull request slackapi#417 from slackapi/gtime_sample_code_update
Browse files Browse the repository at this point in the history
Gtime sample code update
  • Loading branch information
seratch authored Mar 4, 2020
2 parents 217fe72 + 2133625 commit e21b237
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/_basic/ja_opening_modals.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ order: 9

```javascript
// コマンド起動をリッスン
app.command('/ticket', ({ ack, payload, context }) => {
app.command('/ticket', ({ ack, body, context }) => {
// コマンドのリクエストを確認
ack();

try {
const result = app.client.views.open({
token: context.botToken,
// 適切な trigger_id を受け取ってから 3 秒以内に渡す
trigger_id: payload.trigger_id,
trigger_id: body.trigger_id,
// view の値をペイロードに含む
view: {
type: 'modal',
Expand Down
4 changes: 2 additions & 2 deletions docs/_basic/opening_modals.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Read more about modal composition in the <a href="https://api.slack.com/surfaces

```javascript
// Listen for a slash command invocation
app.command('/ticket', ({ ack, payload, context }) => {
app.command('/ticket', ({ ack, body, context }) => {
// Acknowledge the command request
ack();

try {
const result = app.client.views.open({
token: context.botToken,
// Pass a valid trigger_id within 3 seconds of receiving it
trigger_id: payload.trigger_id,
trigger_id: body.trigger_id,
// View payload
view: {
type: 'modal',
Expand Down

0 comments on commit e21b237

Please sign in to comment.