![]() |
Dissonity
Unity SDK for Discord activities
|
Subclass that allows sending RPC commands. More...
Static Public Member Functions | |
| static async Task | CaptureLog (string consoleLevel, string message) |
| Forward logs to your own logger. No scopes required. -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task< EncourageHardwareAccelerationData > | EncourageHardwareAcceleration () |
| Presents a modal dialog to allow enabling of hardware acceleration. No scopes required. -------------------— ✅ | Web ⛔️ | iOS ⛔️ | Android -------------------— | |
| static async Task< ChannelRpc?> | GetChannel (long channelId) |
| Returns information about the channel for a provided channel ID. Scopes required: guilds (+ dm_channels.read for (G)DM channels.) dm_channels.read requires approval from Discord. -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task< GetChannelPermissionsData > | GetChannelPermissions () |
| Returns permissions for the current user in the currently connected channel. Scopes required: guilds.members.read -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task< Entitlement[]> | GetEntitlements () |
| Returns a list of entitlements for the current user. No scopes required. -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task< Sku[]> | GetSkus () |
| Returns a list of SKU objects. SKUs without prices are automatically filtered out. No scopes required. -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task< Entitlement[]> | StartPurchase (long skuId) |
| Launches the purchase flow for a specific SKU ID. No scopes required. -------------------— ✅ | Web ⛔️ | iOS ⛔️ | Android -------------------— | |
| static async Task< GetPlatformBehaviorsData > | GetPlatformBehaviors () |
| Returns information about supported platform behaviors. No scopes required. -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task< OpenExternalLinkData > | OpenExternalLink (string url) |
| Allows for opening an external link from within the Discord client. No scopes required. -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task | OpenInviteDialog () |
| Presents a modal dialog with Channel Invite UI. No scopes required. -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task | OpenShareMomentDialog (string mediaUrl) |
| Presents a modal dialog to share media to a channel or direct message. No scopes required. -------------------— ✅ | Web ⛔️ | iOS ⛔️ | Android -------------------— | |
| static async Task< Activity > | SetActivity (ActivityBuilder activity) |
| Modifies how your activity's rich presence is displayed in the Discord client. Scopes required: rpc.activities.write -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task< SetConfigData > | SetConfig (bool useInteractivePip) |
| Set whether or not the PIP (picture-in-picture) is interactive. No scopes required. -------------------— ✅ | Web ⛔ | iOS ⛔ | Android -------------------— | |
| static async Task | SetOrientationLockState (OrientationLockStateType lockState, OrientationLockStateType? pipLockState=null, OrientationLockStateType? gridLockState=null) |
| Locks the application to specific orientations in each of the supported layout modes. No scopes required. -------------------— ⛔️ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task< UserSettingsGetLocaleData > | UserSettingsGetLocale () |
| Returns the current user's locale. Scopes required: identify -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task< InitiateImageUploadData > | InitiateImageUpload () |
| Presents the file upload flow in the Discord client. No scopes required. -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task< Participant[]> | GetInstanceConnectedParticipants () |
| Returns all participants connected to the instance. No scopes required. -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task< ShareLinkData > | ShareLink (string message, string? customId=null, string? linkId=null) |
| Presents a modal for the user to share a link to your activity with custom query params. No scopes required. -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
| static async Task< Relationship[]> | GetRelationships () |
| Returns the current user's relationships. Scopes required: relationships.read relationships.read requires approval from Discord. -------------------— ✅ | Web ✅ | iOS ✅ | Android -------------------— | |
Subclass that allows sending RPC commands.
|
inlinestatic |
Forward logs to your own logger.
No scopes required.
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Presents a modal dialog to allow enabling of hardware acceleration.
No scopes required.
-------------------—
✅ | Web
⛔️ | iOS
⛔️ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Returns information about the channel for a provided channel ID.
Scopes required: guilds (+ dm_channels.read for (G)DM channels.)
dm_channels.read requires approval from Discord.
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Returns permissions for the current user in the currently connected channel.
Scopes required: guilds.members.read
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Returns a list of entitlements for the current user.
No scopes required.
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Returns all participants connected to the instance.
No scopes required.
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Returns information about supported platform behaviors.
No scopes required.
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Returns the current user's relationships.
Scopes required: relationships.read
relationships.read requires approval from Discord.
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Returns a list of SKU objects. SKUs without prices are automatically filtered out.
No scopes required.
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Presents the file upload flow in the Discord client.
No scopes required.
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Allows for opening an external link from within the Discord client.
No scopes required.
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Presents a modal dialog with Channel Invite UI.
No scopes required.
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Presents a modal dialog to share media to a channel or direct message.
No scopes required.
-------------------—
✅ | Web
⛔️ | iOS
⛔️ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Modifies how your activity's rich presence is displayed in the Discord client.
Scopes required: rpc.activities.write
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Set whether or not the PIP (picture-in-picture) is interactive.
No scopes required.
-------------------—
✅ | Web
⛔ | iOS
⛔ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Locks the application to specific orientations in each of the supported layout modes.
No scopes required.
-------------------—
⛔️ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Presents a modal for the user to share a link to your activity with custom query params.
No scopes required.
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Launches the purchase flow for a specific SKU ID.
No scopes required.
-------------------—
✅ | Web
⛔️ | iOS
⛔️ | Android
-------------------—
| InvalidOperationException | |
| CommandException |
|
inlinestatic |
Returns the current user's locale.
Scopes required: identify
-------------------—
✅ | Web
✅ | iOS
✅ | Android
-------------------—
| InvalidOperationException | |
| CommandException |