Skip to content

Commit

Permalink
update guide (missing objectName) to match examples/app.js (#7359)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinloretz authored Jan 23, 2025
1 parent 1225409 commit 9681969
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/quick_start/Getting_Started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,10 @@ const componentId = data.custom_id;
// Get user ID and object choice for responding user
// User ID is in user field for (G)DMs, and member for servers
const userId = context === 0 ? req.body.member.user.id : req.body.user.id;

// User's object choice
const objectName = data.values[0];

// Calculate result from helper function
const resultStr = getResult(activeGames[gameId], {
id: userId,
Expand Down

0 comments on commit 9681969

Please sign in to comment.