Class DiscordSocialSdkClient
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
Provides bot and OAuth access to Discord Social SDK and game-stat operations.
public sealed class DiscordSocialSdkClient
- Inheritance
-
DiscordSocialSdkClient
- Inherited Members
Remarks
Individual operations require either bot or user authorization. Discord may restrict access to Social SDK or game-stat features.
Constructors
- DiscordSocialSdkClient(DiscordClient)
Creates a Social SDK API client backed by a bot client.
- DiscordSocialSdkClient(DiscordOAuth2Client, DiscordAccessToken)
Creates a Social SDK client for user-authenticated operations.
Methods
- CreateLobbyAsync(Dictionary<string, string>?, IEnumerable<DiscordLobbyMemberUpdate>?, int?, CancellationToken)
Creates a bot-managed lobby with at most 25 initial members.
- CreateLobbySelfInviteAsync(ulong, CancellationToken)
Creates a linked-channel invite targeted at the current OAuth user.
- CreateLobbyUserInviteAsync(ulong, ulong, CancellationToken)
Creates a single-use linked-channel invite for a specified user using bot authentication.
- CreateOrJoinLobbyAsync(string, Dictionary<string, string>?, Dictionary<string, string>?, int?, CancellationToken)
Creates or joins a lobby using the current user's social-layer bearer token.
- DeleteIdentityAsync(ulong, ulong, string, string, string?, CancellationToken)
Deletes an application identity and its associated profile data.
- DeleteLobbyAsync(ulong, CancellationToken)
Deletes a bot-managed lobby.
- GetIdentitiesByExternalIdAsync(ulong, string, string, string?, CancellationToken)
Finds application identities by external provider and user ID.
- GetLobbyAsync(ulong, CancellationToken)
Gets a bot-managed lobby.
- GetLobbyMessagesAsync(ulong, int, CancellationToken)
Gets recent lobby messages as the current OAuth user.
- GetProfileAsync(ulong, ulong, string, CancellationToken)
Gets game-stat profile data for an authorized user's external identity.
- GetProvisionalTokenAsync(string, string?, CancellationToken)
Creates or retrieves a provisional account token using the bot token.
- GetUserIdentitiesAsync(ulong, ulong, CancellationToken)
Lists an authorized user's application identities.
- LeaveLobbyAsync(ulong, CancellationToken)
Removes the current OAuth user from a lobby.
- LinkLobbyChannelAsync(ulong, ulong?, CancellationToken)
Links or unlinks a guild channel using a lobby member's bearer token.
- ModifyLobbyAsync(ulong, Optional<Dictionary<string, string>?>, IEnumerable<DiscordLobbyMemberUpdate>?, int?, CancellationToken)
Replaces supplied lobby fields; a supplied members list replaces the entire membership.
- RemoveLobbyMemberAsync(ulong, ulong, CancellationToken)
Removes a member from a bot-managed lobby.
- SendLobbyMessageAsync(ulong, string, Dictionary<string, string>?, MessageFlags?, CancellationToken)
Sends a lobby message as the current OAuth user.
- UnmergeProvisionalAccountAsync(string, CancellationToken)
Unmerges a bot-issued provisional account from a Discord account.
- UpdateDirectMessageModerationAsync(ulong, ulong, ulong, IReadOnlyDictionary<string, string>, CancellationToken)
Updates application-scoped moderation metadata on a Social SDK direct message.
- UpdateLobbyMembersAsync(ulong, IEnumerable<DiscordLobbyMemberUpdate>, CancellationToken)
Adds, updates, or removes one to 25 members in one request.
- UpdateLobbyMessageModerationAsync(ulong, ulong, Dictionary<string, string>, CancellationToken)
Updates application-scoped moderation metadata on a lobby message.
- UpdateProfileAsync(ulong, ulong, string, Optional<string>, Optional<DiscordGameProfileData>, CancellationToken)
Updates an authorized user's application identity profile.
- UpsertLobbyMemberAsync(ulong, DiscordLobbyMemberUpdate, CancellationToken)
Adds or updates one member in a bot-managed lobby.