Discord Social SDK
|
The namespace for the generated Discord SDK bindings. More...
The namespace for the generated Discord SDK bindings.
Classes | |
class | Activity |
An Activity represents one "thing" a user is doing on Discord and is part of their rich presence. More... | |
class | ActivityAssets |
Struct which controls what your rich presence looks like in the Discord client. If you don't specify any values, the icon and name of your application will be used as defaults. More... | |
class | ActivityButton |
class | ActivityInvite |
When one user invites another to join their game on Discord, it will send a message to that user. The SDK will parse those messages for you automatically, and this struct contains all of the relevant invite information which is needed to later accept that invite. More... | |
class | ActivityParty |
class | ActivitySecrets |
class | ActivityTimestamps |
class | AdditionalContent |
Contains information about non-text content in a message that likely cannot be rendered in game such as images, videos, embeds, polls, and more. More... | |
class | AudioDevice |
Represents a single input or output audio device available to the user. More... | |
class | AuthorizationArgs |
Arguments to the Client::Authorize function. More... | |
class | AuthorizationCodeChallenge |
Struct that encapsulates the challenge part of the code verification flow. More... | |
class | AuthorizationCodeVerifier |
Struct that encapsulates both parts of the code verification flow. More... | |
class | Call |
Class that manages an active voice session in a Lobby. More... | |
class | CallInfoHandle |
Convenience class that represents the state of a single Discord call in a lobby. More... | |
class | ChannelHandle |
All messages sent on Discord are done so in a Channel. MessageHandle::ChannelId will contain the ID of the channel a message was sent in, and Client::GetChannelHandle will return an instance of this class. More... | |
class | Client |
The Client class is the main entry point for the Discord SDK. All functionality is exposed through this class. More... | |
class | ClientCreateOptions |
Options for creating a new Client instance. More... | |
class | ClientResult |
Struct that stores information about the result of an SDK function call. More... | |
class | DeviceAuthorizationArgs |
Arguments to the Client::GetTokenFromDevice function. More... | |
class | GuildChannel |
Represents a channel in a guild that the current user is a member of and may be able to be linked to a lobby. More... | |
class | GuildMinimal |
Represents a guild (also knowns as a Discord server), that the current user is a member of, that contains channels that can be linked to a lobby. More... | |
class | LinkedChannel |
Struct that stores information about the channel that a lobby is linked to. More... | |
class | LinkedLobby |
Struct that stores information about the lobby linked to a channel. More... | |
class | LobbyHandle |
A LobbyHandle represents a single lobby in the SDK. A lobby can be thought of as just an arbitrary, developer-controlled group of users that can communicate with each other. More... | |
class | LobbyMemberHandle |
A LobbyMemberHandle represents the state of a single user in a Lobby. More... | |
class | MessageHandle |
A MessageHandle represents a single message received by the SDK. More... | |
class | RelationshipHandle |
A RelationshipHandle represents the relationship between the current user and a target user on Discord. Relationships include friends, blocked users, and friend invites. More... | |
class | UserHandle |
A UserHandle represents a single user on Discord that the SDK knows about and contains basic account information for them such as id, name, and avatar, as well as their "status" information which includes both whether they are online/offline/etc as well as whether they are playing this game. More... | |
class | VADThresholdSettings |
Settings for the void auto detection threshold for picking up activity from a user's mic. More... | |
class | VoiceStateHandle |
A VoiceStateHandle represents the state of a single participant in a Discord voice call. More... | |
Enumerations | |
enum class | DiscordObjectState { Invalid , Owned } |
Represents the memory state of a Discord object. More... | |
enum class | ActivityActionTypes { Join = 1 , JoinRequest = 5 } |
ActivityActionTypes represents the type of invite being sent to a user. More... | |
enum class | ActivityPartyPrivacy { Private = 0 , Public = 1 } |
Allows your game to control the privacy of the party the user is in. More... | |
enum class | ActivityTypes { Playing = 0 , Streaming = 1 , Listening = 2 , Watching = 3 , CustomStatus = 4 , Competing = 5 , HangStatus = 6 } |
Discord RichPresence supports multiple types of activities that a user can be doing. More... | |
enum class | ActivityGamePlatforms { Desktop = 1 , Xbox = 2 , Samsung = 4 , IOS = 8 , Android = 16 , Embedded = 32 , PS4 = 64 , PS5 = 128 } |
Represents the type of platforms that an activity invite can be accepted on. More... | |
enum class | ErrorType { None = 0 , NetworkError = 1 , HTTPError = 2 , ClientNotReady = 3 , Disabled = 4 , ClientDestroyed = 5 , ValidationError = 6 , Aborted = 7 , AuthorizationFailed = 8 , RPCError = 9 } |
Enum representing various types of errors the SDK returns. More... | |
enum class | HttpStatusCode { None = 0 , Continue = 100 , SwitchingProtocols = 101 , Processing = 102 , EarlyHints = 103 , Ok = 200 , Created = 201 , Accepted = 202 , NonAuthoritativeInfo = 203 , NoContent = 204 , ResetContent = 205 , PartialContent = 206 , MultiStatus = 207 , AlreadyReported = 208 , ImUsed = 209 , MultipleChoices = 300 , MovedPermanently = 301 , Found = 302 , SeeOther = 303 , NotModified = 304 , TemporaryRedirect = 307 , PermanentRedirect = 308 , BadRequest = 400 , Unauthorized = 401 , PaymentRequired = 402 , Forbidden = 403 , NotFound = 404 , MethodNotAllowed = 405 , NotAcceptable = 406 , ProxyAuthRequired = 407 , RequestTimeout = 408 , Conflict = 409 , Gone = 410 , LengthRequired = 411 , PreconditionFailed = 412 , PayloadTooLarge = 413 , UriTooLong = 414 , UnsupportedMediaType = 415 , RangeNotSatisfiable = 416 , ExpectationFailed = 417 , MisdirectedRequest = 421 , UnprocessableEntity = 422 , Locked = 423 , FailedDependency = 424 , TooEarly = 425 , UpgradeRequired = 426 , PreconditionRequired = 428 , TooManyRequests = 429 , RequestHeaderFieldsTooLarge = 431 , InternalServerError = 500 , NotImplemented = 501 , BadGateway = 502 , ServiceUnavailable = 503 , GatewayTimeout = 504 , HttpVersionNotSupported = 505 , VariantAlsoNegotiates = 506 , InsufficientStorage = 507 , LoopDetected = 508 , NotExtended = 510 , NetworkAuthorizationRequired = 511 } |
Enum that represents the various HTTP status codes that can be returned. More... | |
enum class | AuthenticationCodeChallengeMethod { S256 = 0 } |
Represents the crypto method used to generate a code challenge. More... | |
enum class | IntegrationType { GuildInstall = 0 , UserInstall = 1 } |
Represents the type of integration the app will be installed as. More... | |
enum class | AdditionalContentType { Other = 0 , Attachment = 1 , Poll = 2 , VoiceMessage = 3 , Thread = 4 , Embed = 5 , Sticker = 6 } |
Represents the type of additional content contained in a message. More... | |
enum class | AudioSystem { Standard = 0 , Game = 1 } |
The Discord Voice audio system to use. More... | |
enum class | AudioModeType { MODE_UNINIT = 0 , MODE_VAD = 1 , MODE_PTT = 2 } |
Represents whether a voice call is using push to talk or auto voice detection. More... | |
enum class | ChannelType { GuildText = 0 , Dm = 1 , GuildVoice = 2 , GroupDm = 3 , GuildCategory = 4 , GuildNews = 5 , GuildStore = 6 , GuildNewsThread = 10 , GuildPublicThread = 11 , GuildPrivateThread = 12 , GuildStageVoice = 13 , GuildDirectory = 14 , GuildForum = 15 , GuildMedia = 16 , Lobby = 17 , EphemeralDm = 18 } |
Enum that represents the various channel types on Discord. More... | |
enum class | RelationshipType { None = 0 , Friend = 1 , Blocked = 2 , PendingIncoming = 3 , PendingOutgoing = 4 , Implicit = 5 , Suggestion = 6 } |
Enum that represents the possible types of relationships that can exist between two users. More... | |
enum class | StatusType { Online = 0 , Offline = 1 , Blocked = 2 , Idle = 3 , Dnd = 4 , Invisible = 5 , Streaming = 6 , Unknown = 7 } |
Enum that specifies the various online statuses for a user. More... | |
enum class | DisclosureTypes { MessageDataVisibleOnDiscord = 3 } |
Enum that represents various informational disclosures that Discord may make to users, so that the game can identity them and customize their rendering as desired. More... | |
enum class | AuthorizationTokenType { User = 0 , Bearer = 1 } |
Represents the type of auth token used by the SDK, either the normal tokens produced by the Discord desktop app, or an oauth2 bearer token. Only the latter can be used by the SDK. More... | |
enum class | AuthenticationExternalAuthType { OIDC = 0 , EpicOnlineServicesAccessToken = 1 , EpicOnlineServicesIdToken = 2 , SteamSessionTicket = 3 , UnityServicesIdToken = 4 } |
Represents the various identity providers that can be used to authenticate a provisional account user for public clients. More... | |
enum class | LoggingSeverity { Verbose = 1 , Info = 2 , Warning = 3 , Error = 4 , None = 5 } |
Enum that represents the various log levels supported by the SDK. More... | |
enum class | RelationshipGroupType { OnlinePlayingGame = 0 , OnlineElsewhere = 1 , Offline = 2 } |
Enum that represents the logical groups of relationships based on online status and game activity. More... | |
|
strong |
ActivityActionTypes represents the type of invite being sent to a user.
There are essentially two types of invites: 1: A user with an existing activity party can invite another user to join that existing party 2: A user can request to join the existing activity party of another user
See https://discord.com/developers/docs/rich-presence/overview for more information.
Enumerator | ||
---|---|---|
Join | 1 | Join. |
JoinRequest | 5 | JoinRequest. |
|
strong |
|
strong |
Allows your game to control the privacy of the party the user is in.
|
strong |
Discord RichPresence supports multiple types of activities that a user can be doing.
For the SDK, the only activity type that is really relevant is Playing
. The others are provided for completeness.
See https://discord.com/developers/docs/rich-presence/overview for more information.
Enumerator | ||
---|---|---|
Playing | 0 | Playing. |
Streaming | 1 | Streaming. |
Listening | 2 | Listening. |
Watching | 3 | Watching. |
CustomStatus | 4 | CustomStatus. |
Competing | 5 | Competing. |
HangStatus | 6 | HangStatus. |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Represents the various identity providers that can be used to authenticate a provisional account user for public clients.
|
strong |
|
strong |
Enum that represents the various channel types on Discord.
For more information see: https://discord.com/developers/docs/resources/channel
|
strong |
Enum that represents various informational disclosures that Discord may make to users, so that the game can identity them and customize their rendering as desired.
See MessageHandle for more details.
|
strong |
|
strong |
Enum representing various types of errors the SDK returns.
Enumerator | ||
---|---|---|
None | 0 | No error, the operation was successful. |
NetworkError | 1 | The user is offline or there was some network issue that prevented an underlying HTTP call from succeeding. |
HTTPError | 2 | An HTTP call was made to Discord's servers but a non success HTTP status code was returned. In some cases this may be retryable, and if so ClientResult::Retryable will be true. In most cases though the failure is due to a validation or permissions error, and the request is not retryable. ClientResult::Error and ClientResult::ErrorCode will have more information. |
ClientNotReady | 3 | An operation such as sending a friend request or joining a lobby was attempted but the Client is not yet ready. Wait for Client::Status to change to Client::Status::Ready before trying again. Also be sure to call Client::Connect to begin the process of connecting to Discord's servers, otherwise the Client will never become ready. |
Disabled | 4 | An operation was temporarily disabled for stability reasons. |
ClientDestroyed | 5 | The Client has been destroyed and so this operation cannot complete. |
ValidationError | 6 | Used when an SDK method is called but the inputs don't pass local validation. For example if one attempts to accept a friend request when there is no pending friend request for that user, this ErrorType would be used. The specific validation error will be included in the |
Aborted | 7 | The user or developer aborted an operation, such as an authorization flow. |
AuthorizationFailed | 8 | An authorization function failed, but not necessarily as the result of an HTTP call that returned an error. |
RPCError | 9 | An RPC call was made to Discord's desktop application, but it returned a non-success result. The error and errorCode fields should both be set with more information. |
|
strong |
Enum that represents the various HTTP status codes that can be returned.
You can read more about these at: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status For convenience, we have defined a couple of enum values that are non-standard HTTP codes to represent certain types of errors.
|
strong |
|
strong |
|
strong |
|
strong |
Enum that represents the possible types of relationships that can exist between two users.
|
strong |
Enum that specifies the various online statuses for a user.
Generally a user is online or offline, but in Discord users are able to further customize their status such as turning on "Do not Disturb" mode or "Dnd" to silence notifications.
|
inline |
Converts a discordpp::ActivityActionTypes to a string.
|
inline |
Converts a discordpp::ActivityGamePlatforms to a string.
|
inline |
Converts a discordpp::ActivityPartyPrivacy to a string.
|
inline |
Converts a discordpp::ActivityTypes to a string.
|
inline |
Converts a discordpp::AdditionalContentType to a string.
|
inline |
Converts a discordpp::AudioModeType to a string.
|
inline |
Converts a discordpp::AudioSystem to a string.
|
inline |
Converts a discordpp::AuthenticationCodeChallengeMethod to a string.
|
inline |
Converts a discordpp::AuthenticationExternalAuthType to a string.
|
inline |
Converts a discordpp::AuthorizationTokenType to a string.
|
inline |
Converts a discordpp::Call::Error to a string.
|
inline |
Converts a discordpp::Call::Status to a string.
|
inline |
Converts a discordpp::ChannelType to a string.
|
inline |
Converts a discordpp::Client::Error to a string.
|
inline |
Converts a discordpp::Client::Status to a string.
|
inline |
Converts a discordpp::Client::Thread to a string.
|
inline |
Converts a discordpp::DisclosureTypes to a string.
|
inline |
Converts a discordpp::ErrorType to a string.
|
inline |
Converts a discordpp::HttpStatusCode to a string.
|
inline |
Converts a discordpp::IntegrationType to a string.
|
inline |
Converts a discordpp::LoggingSeverity to a string.
|
inline |
Converts a discordpp::RelationshipGroupType to a string.
|
inline |
Converts a discordpp::RelationshipType to a string.
|
inline |
Converts a discordpp::StatusType to a string.
|
inline |
Converts a discordpp::UserHandle::AvatarType to a string.
|
inline |
Runs pending callbacks from the Discord SDK.
You should call this function periodically to process callbacks, e.g. once per frame.