|
| class | Commands |
| | Subclass that allows sending RPC commands. More...
|
| |
| class | HiRpc |
| | Subclass that enables C#/JS interoperation. More...
|
| |
| class | LocalStorage |
| | Subclass that allows storing key-value pairs locally. More...
|
| |
| class | Proxy |
| | Subclass that helps sending HTTPs requests through the Discord proxy. More...
|
| |
| class | Subscribe |
| | Subclass that allows listening to RPC events. More...
|
| |
|
| static long | ClientId [get] |
| | ❄️ Your app's client id.
|
| |
| static string | InstanceId [get] |
| | Unique string id for each activity instance.
|
| |
| static string | Platform [get] |
| | The platform on which the activity is running. It's a value of Models.Platform .
|
| |
| static ? long | GuildId [get] |
| | ❄️ The id of the guild on which the activity is running. Returns null if the activity runs in a DM.
|
| |
| static long | ChannelId [get] |
| | ❄️ The id of the channel on which the activity is running.
|
| |
| static string | FrameId [get] |
| | The activity frame id.
|
| |
| static ? string | MobileAppVersion [get] |
| | The mobile client version. Returns null in desktop.
|
| |
| static string | CustomId [get] |
| | Query custom id. Used when a user joins the activity via a shared link.
|
| |
| static string | ReferrerId [get] |
| | Query referrer id. Used when a user joins the activity via a shared link.
|
| |
| static string | LocationId [get] |
| | Query location id.
|
| |
| static ? long | UserId [get] |
| | ❄️ The current user id.
|
| |
| static string | AccessToken [get] |
| | Your client access token.
⚠️ This is highly-sensitive data. Handle this token securely and don't expose it. Use encryption if you need it outside of Unity.
|
| |
| static string | ApplicationAccessHash [get] |
| | Your hiRPC application access hash.
⚠️ This allows access to restricted hiRPC functionality. Handle it securely.
|
| |
| static bool | Initialized [get] |
| | True after the first Api.Initialize call, regardless of success.
|
| |
| static bool | Ready [get] |
| | True if the Api.Initialize call was successful.
|
| |
| static ? User | SyncedUser [get] |
| | If SynchronizeUser is enabled in the config, returns the current user object.
|
| |
| static ? GuildMemberRpc | SyncedGuildMemberRpc [get] |
| | If SynchronizeGuildMemberRpc is enabled in the config, returns the current guild member RPC object.
|
| |
| static ISdkConfiguration | Configuration [get] |
| |
| static bool | IsMock [get] |
| |
◆ ClearAllSubscriptions()
| static void Dissonity.Api.ClearAllSubscriptions |
( |
| ) |
|
|
inlinestatic |
Remove all subscriptions from every event.
- Exceptions
-
| InvalidOperationException | |
◆ Close()
| static void Dissonity.Api.Close |
( |
RpcCloseCode | code, |
|
|
string | message = "" ) |
|
inlinestatic |
Close the app with a specified code and reason.
- Exceptions
-
| InvalidOperationException | |
◆ FormatPrice()
| static Task< string > Dissonity.Api.FormatPrice |
( |
SkuPrice | price, |
|
|
string | locale = Locale::UsEnglish ) |
|
inlinestatic |
Use this method to easily render SKU prices. When called in the Unity Editor, uses a generic currency symbol ¤ .
- Exceptions
-
| InvalidOperationException | |
◆ Initialize()
| static Task< MultiEvent > Dissonity.Api.Initialize |
( |
| ) |
|
|
inlinestatic |
Initializes Dissonity. You must call and await this method once before doing anything else.
- Exceptions
-
◆ OnReady()
| static async Task< bool > Dissonity.Api.OnReady |
( |
| ) |
|
|
inlinestatic |
Use this method to wait for initialization to complete.
Returns true if the game is executed inside Discord.
◆ PatchUrlMappings()
◆ Unsubscribe()
Remove a subscription via a DiscordSubscription instance (returned by subscription methods).
- Exceptions
-
| InvalidOperationException | |
| ArgumentException | |
◆ Unsubscribe< T >()
Remove a subscription via the event return data type and a method.
- Exceptions
-
| InvalidOperationException | |
| ArgumentException | |
◆ UnsubscribeFromEvent()
| static void Dissonity.Api.UnsubscribeFromEvent |
( |
string | eventString | ) |
|
|
inlinestatic |
Remove all subscriptions related to a single event.
- Exceptions
-
| InvalidOperationException | |
◆ ProxyDomain
| const string Dissonity.Api.ProxyDomain = "discordsays.com" |
|
static |
◆ AccessToken
| string Dissonity.Api.AccessToken |
|
staticget |
Your client access token.
⚠️ This is highly-sensitive data. Handle this token securely and don't expose it. Use encryption if you need it outside of Unity.
◆ ApplicationAccessHash
| string Dissonity.Api.ApplicationAccessHash |
|
staticget |
Your hiRPC application access hash.
⚠️ This allows access to restricted hiRPC functionality. Handle it securely.
◆ ChannelId
| long Dissonity.Api.ChannelId |
|
staticget |
❄️ The id of the channel on which the activity is running.
◆ ClientId
| long Dissonity.Api.ClientId |
|
staticget |
◆ Configuration
| ISdkConfiguration Dissonity.Api.Configuration |
|
staticget |
◆ CustomId
| string Dissonity.Api.CustomId |
|
staticget |
Query custom id. Used when a user joins the activity via a shared link.
◆ FrameId
| string Dissonity.Api.FrameId |
|
staticget |
◆ GuildId
| ? long Dissonity.Api.GuildId |
|
staticget |
❄️ The id of the guild on which the activity is running. Returns null if the activity runs in a DM.
◆ Initialized
| bool Dissonity.Api.Initialized |
|
staticget |
◆ InstanceId
| string Dissonity.Api.InstanceId |
|
staticget |
Unique string id for each activity instance.
◆ IsMock
| bool Dissonity.Api.IsMock |
|
staticget |
◆ LocationId
| string Dissonity.Api.LocationId |
|
staticget |
◆ MobileAppVersion
| ? string Dissonity.Api.MobileAppVersion |
|
staticget |
The mobile client version. Returns null in desktop.
◆ Platform
| string Dissonity.Api.Platform |
|
staticget |
The platform on which the activity is running. It's a value of Models.Platform .
◆ Ready
◆ ReferrerId
| string Dissonity.Api.ReferrerId |
|
staticget |
Query referrer id. Used when a user joins the activity via a shared link.
◆ SyncedGuildMemberRpc
If SynchronizeGuildMemberRpc is enabled in the config, returns the current guild member RPC object.
◆ SyncedUser
| ? User Dissonity.Api.SyncedUser |
|
staticget |
If SynchronizeUser is enabled in the config, returns the current user object.
◆ UserId
| ? long Dissonity.Api.UserId |
|
staticget |
The documentation for this class was generated from the following file: