Discord Social SDK
|
This small update to v1.6 adds some highly requested features from our partners. We found some time to sneak them in…
asset key
to an image in the activity.assets.inviteCoverImage
parameter when calling Client::UpdateRichPresence
. This method even affords you the ability to set a unique image on each invite if you want!Rich Presence
tab in the Developer Portal for your Application. Note: This will be used as the fallback image if you don’t specify one via method 1activity.name
parameter when calling Client::UpdateRichPresence
Client::GetUserGuilds
on iOS devicesThis release adds features to support upcoming Discord experiments that will enhance how games integrate with user profiles and authentication:
UserApplicationProfile
support with two new methods: Client::GetUserApplicationProfiles
and Client::GetUserApplicationProfilesNoLock
on the Users class, which retrieve game identity data from external authentication providers.Client::RegisterAuthorizeRequestCallback
and Client::RemoveAuthorizeRequestCallback
methods to handle authentication requests that originate from various Discord entry points. These functions support upcoming Discord client experiments that will be gradually rolled out to users over time.More detailed documentation will be available when the client experiments conclude. Additional new features:
Client::GetGuildChannels
, channels are now sorted by their position
field, which matches how they are sorted in the Discord client.This deprecation aims to improve consistence across the SDK’s API surface as well as provide a safer implementation that has fewer edge cases and less potential for accidental misuse.
Client::GetCurrentUser
API in favor of Client::GetCurrentUserV2
which returns optional values instead of potentially invalid handles.Client::GetUserMessagesWithLimit
function to avoid unnecessary remote API calls when sufficient messages are already cached locally.Fixes several critical bugs with the voice communications system, as well as improved overall reliability, and noise and echo suppression and cancellation.
Disconnected
state instead of reconnecting properly after a network interruption.Multiple general critical bugs that can cause crashes and panics. We highly recommend upgrading to 1.6 to avoid them in your game.
With the release of DM chat history this patch, the Social SDK can now fully support asynchronous player communication between individual players and in larger chat rooms. Players who go offline or background the came can come back to the history of the chat room and get caught up with what’s happening.
Client::GetUserMessageSummaries
and Client::GetUserMessagesWithLimit
to retrieve direct message historyRich Presence can now more accurately display the different types of activities a player might be engaged in. Specifically, the “Competing” status may be valuable for games that host tournaments, weekend brackets, or other competitive play. Also, when you receive game invites, you can now accept them cross-device; don’t miss the group forming even if you’re AFK.
ActivityInviteCreatedCallback
will be invoked on connected SDK sessions.Linked channels are all about keeping groups of friends connected in and outside the game. You can now join a player to channel’s linked Discord server from in-game, helping them bridge that gap and stay connected with friends even when they stop playing.
Client::JoinLinkedLobbyGuild()
to allow members of linked lobbies to join the linked lobby's guild from in-gameThe many-step process of mobile account linking has been simplified for users with Discord installed by deep-linking into the Discord mobile app to authorize with your game
ClientCreateOptions
when instantiating the client and set the experimentalAndroidPreventCommsForBluetooth
flagThe many-step process of mobile account linking has been simplified for users with Discord installed by deep-linking into the Discord mobile app to authorize with your game
Client::SetVoiceLogDir
didn’t have any effectClient::GetCurrentUser
when the client is in an unexpected non-Ready state. Added Client::GetCurrentUserV2
which explicitly returns an optional handle instead of dummy data in this situation. This issue also affected the Unity and Unreal versions of the SDKCall::SetPTTActive
GetUserMessagesWithLimit
GetUserMessagesWithLimit
will directly query the backend rather than using local SDK-side caching. This may have performance implications, particularly under high-frequency usage.Client::GetLobbyMessagesWithLimit
to retrieve lobby message histories based on a provided lobby ID, with a maximum of 200 messages and up to 72 hours.Client::GetRelationshipsByGroup
which both logically groups a user’s relationships for the purpose of rendering a friends list and sorts users based on our Unified Friends List design guidelines. Before, it was necessary to call Client::GetRelationships
and manually partition each relationship into the appropriate friend group, as well as write your own sorting operations.Client::SetRelationshipGroupsUpdatedCallback
which fires whenever a user change occurs which could invalidate a previously sorted friends list retrieved from Client::GetRelationshipsByGroup
. Call Client::GetRelationshipsByGroup
again to maintain an up-to-date friends list.IsSpamRequest
to RelationshipHandle
, returns true
if Discord believes the request to be spam.ClientCreateOptions
parameter whose experimentalAudioSystem
property is set to AudioSystem::Game
. In this case, you should also set Client::SetEngineManagedAudioSession
to true. We do not recommend using this for production - however, if you are interested in trying it out, we are looking for feedback!Client::SetAecDump
to enable recording of audio diagnostic information.Client::ExchangeChildToken
to facilitate child token exchange for public clients. Confidential clients will require a server to server implementation, but this method may be useful for development.applicationId
field on the ActivityInvite
payload.ApplicationId
method on the MessageHandle
.Client::RevokeToken
and Client::UnmergeIntoProvisionalAccount
to allow games leveraging Public Clients to perform token revocation or unmerge operations directly from clients.APPLICATION_DEAUTHORIZED
webhook event which can be configured in the developer portal. When a user unlinks their account or revokes authorization for your application in any way, this event will be sent to configured webhooks. The payload will contain serialized user information. See https://discord.com/developers/docs/events/webhook-events for more information on configuring webhook events. Documentation is coming soon, but check the developer portal for details in the meantime.Client::Authorize
support remains iOS 15. Support for legacy iOS versions is limited to provisional accounts at this time.Activity::AddButton
Client::OpenConnectedGamesSettingsInDiscord
for deeplinking into Discord's settings for connected games, which provides players some control over who can DM themClient::RegisterLaunchCommand
and Client::RegisterLaunchSteamApplication
Client::RegisterLaunchCommand
and Client::RegisterLaunchSteamApplication
now work from inside the Steam Runtime on LinuxDownloads for the SDK can now be found on the developer portal. If you go to https://discord.com/developers/applications and click on your application you should have a new "Discord Social SDK" section in the sidebar (shown below) and you can download the latest release from there.
In the 1.0 release, we removed all APIs that were previously marked as deprecated. Additionally we had to make one additional breaking change from the previous release. Before we had a single Client::GetDefaultScopes
function that returned the oauth scopes to use, but we planned on separating these.
Client::GetDefaultPresenceScopes
now returns an oauth scope that will enable: account linking, the friends list, rich presence, provisional accounts, and activity invites.Client::GetDefaultCommunicationScopes
now returns an oauth scope that will enable: user DMs, lobbies, linked channels, and voice chat, in addition to everything in the presence scopes.Client::GetDefaultCommunicationScopes
is the exact same as what your integrations have been using so far, so just switching to that will be a noop, it returns the exact same oauth scopes as before and nothing else has changed.
However, if you are not planning to use DMs or Lobbies, you should consider switching to Client::GetDefaultPresenceScopes
, since that way when users go to authorize the integration, they will only see the scopes that your integration is actually requesting, and won't wonder why you are requesting messaging permissions when you don't use them. If you have any questions about this though, please reach out!
Going forward, we are also enabling linked channels by default for apps that use the "communications" scopes, however, that change was not retroactive, so if you plan to use linked channels, please reach out to us when you are ready and we can turn that on for you.
Call::GetVADThreshold
Client::SetSelfDeafAll
Client::StartCall
will return null if attempting to start a call in a lobby while already in a call for that same lobbyUserHandle::Status
and UserHandle::GameActivity
not including information about the current userDiscord_SetGlobalAllocator
was not exportedDiscordObjectState::Unowned
since it was never usedAcceptGameFriendRequest