Skip to content

Conversation

@thiagola92
Copy link
Contributor

@thiagola92 thiagola92 commented Apr 29, 2025

In Sending Direct Messages - Sending a Direct Message to a User, it calls result.GetError() when it should be result.Error().


In Creating a Unified Friend List - Step 2: Organize Relationships, inGame vector is never filled.

I'm assuming that this is how I'm suppose to fill because previous example from this page showed:

str += " IsOnlineInGame: " + std::to_string(user->GameActivity() != std::nullopt);

Also in Creating a Unified Friend List - Step 2: Organize Relationships, DisplayFriendsList signature is probably wrong because the code treat client as a pointer (client->GetRelationships()).

I'm assuming that it's a std::shared_ptr<discordpp::Client> because in it is in Getting Started with C++ and the Discord Social SDK.

@thiagola92 thiagola92 requested a review from a team as a code owner April 29, 2025 15:45
@thiagola92 thiagola92 requested review from markmandel and removed request for a team April 29, 2025 15:45
Copy link
Contributor

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the fixes! Will go live on the next publish.


```cpp
void DisplayFriendsList(discordpp::Client& client) {
void DisplayFriendsList(std::shared_ptr<discordpp::Client> client) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I like it 👍🏻


// Categorize based on status
if (user->Status() != discordpp::StatusType::Offline) {
if (user->GameActivity()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, since GameActivity() returns std::optional 👍🏻

@markmandel markmandel merged commit 7f99239 into discord:main Apr 29, 2025
4 checks passed
@colinloretz colinloretz added the social-sdk Feedback and PRs on Social SDK label May 8, 2025
mazylol pushed a commit to mazylol/discord-api-docs that referenced this pull request Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

social-sdk Feedback and PRs on Social SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants