Dissonity
Unity SDK for Discord activities
Loading...
Searching...
No Matches
Dissonity.Api.Subscribe Class Reference

Subclass that allows listening to RPC events. More...

Static Public Member Functions

static async Task< DiscordSubscriptionActivityInstanceParticipantsUpdate (Action< Participant[]> listener)
 Received when the number of instance participants changes.

No scopes required.
 
static async Task< DiscordSubscriptionActivityLayoutModeUpdate (Action< LayoutModeType > listener)
 Received when a user changes the layout mode in the Discord client.

No scopes required.
 
static async Task< DiscordSubscriptionCurrentUserUpdate (Action< User > listener)
 Received when the current user object changes.

Scopes required: identify

 
static async Task< DiscordSubscriptionCurrentGuildMemberUpdate (long guildId, Action< GuildMemberRpc > listener)
 Received when the current guild member object changes.

Scopes required: identify , guilds.members.read

 
static async Task< DiscordSubscriptionEntitlementCreate (Action< Entitlement > listener)
 Received when an entitlement is created for a SKU.

No scopes required.
 
static DiscordSubscription Error (Action< ErrorEventData > listener)
 Non-subscription event sent when there is an error, including command responses.

No scopes required.
 
static async Task< DiscordSubscriptionOrientationUpdate (Action< OrientationType > listener)
 Received when screen orientation changes.

No scopes required.
 
static async Task< DiscordSubscriptionSpeakingStart (long channelId, Action< SpeakingData > listener)
 Received when a user in a subscribed voice channel speaks.

Scopes required: rpc.voice.read

 
static async Task< DiscordSubscriptionSpeakingStop (long channelId, Action< SpeakingData > listener)
 Received when a user in a subscribed voice channel stops speaking.

Scopes required: rpc.voice.read

 
static async Task< DiscordSubscriptionThermalStateUpdate (Action< ThermalStateType > listener)
 Received when Android or iOS thermal states are surfaced to the Discord mobile app.

No scopes required.
 
static async Task< DiscordSubscriptionVoiceStateUpdate (long channelId, Action< UserVoiceState > listener)
 Received when a user's voice state changes in a subscribed voice channel (mute, volume, etc).

Scopes required: rpc.voice.read

 
static async Task< DiscordSubscriptionRelationshipUpdate (Action< Relationship > listener)
 Received when a relationship of the current user is updated.

Scopes required: relationships.read

relationships.read requires approval from Discord.

 

Detailed Description

Subclass that allows listening to RPC events.

Member Function Documentation

◆ ActivityInstanceParticipantsUpdate()

static async Task< DiscordSubscription > Dissonity.Api.Subscribe.ActivityInstanceParticipantsUpdate ( Action< Participant[]> listener)
inlinestatic

Received when the number of instance participants changes.

No scopes required.

Exceptions
InvalidOperationException
CommandException

◆ ActivityLayoutModeUpdate()

static async Task< DiscordSubscription > Dissonity.Api.Subscribe.ActivityLayoutModeUpdate ( Action< LayoutModeType > listener)
inlinestatic

Received when a user changes the layout mode in the Discord client.

No scopes required.

Exceptions
InvalidOperationException
CommandException

◆ CurrentGuildMemberUpdate()

static async Task< DiscordSubscription > Dissonity.Api.Subscribe.CurrentGuildMemberUpdate ( long guildId,
Action< GuildMemberRpc > listener )
inlinestatic

Received when the current guild member object changes.

Scopes required: identify , guilds.members.read

Exceptions
InvalidOperationException
CommandException

◆ CurrentUserUpdate()

static async Task< DiscordSubscription > Dissonity.Api.Subscribe.CurrentUserUpdate ( Action< User > listener)
inlinestatic

Received when the current user object changes.

Scopes required: identify

Exceptions
InvalidOperationException
CommandException

◆ EntitlementCreate()

static async Task< DiscordSubscription > Dissonity.Api.Subscribe.EntitlementCreate ( Action< Entitlement > listener)
inlinestatic

Received when an entitlement is created for a SKU.

No scopes required.

Exceptions
InvalidOperationException
CommandException

◆ Error()

static DiscordSubscription Dissonity.Api.Subscribe.Error ( Action< ErrorEventData > listener)
inlinestatic

Non-subscription event sent when there is an error, including command responses.

No scopes required.

Exceptions
InvalidOperationException
CommandException

◆ OrientationUpdate()

static async Task< DiscordSubscription > Dissonity.Api.Subscribe.OrientationUpdate ( Action< OrientationType > listener)
inlinestatic

Received when screen orientation changes.

No scopes required.

Exceptions
InvalidOperationException
CommandException

◆ RelationshipUpdate()

static async Task< DiscordSubscription > Dissonity.Api.Subscribe.RelationshipUpdate ( Action< Relationship > listener)
inlinestatic

Received when a relationship of the current user is updated.

Scopes required: relationships.read

relationships.read requires approval from Discord.

Exceptions
InvalidOperationException
CommandException

◆ SpeakingStart()

static async Task< DiscordSubscription > Dissonity.Api.Subscribe.SpeakingStart ( long channelId,
Action< SpeakingData > listener )
inlinestatic

Received when a user in a subscribed voice channel speaks.

Scopes required: rpc.voice.read

Exceptions
InvalidOperationException
CommandException

◆ SpeakingStop()

static async Task< DiscordSubscription > Dissonity.Api.Subscribe.SpeakingStop ( long channelId,
Action< SpeakingData > listener )
inlinestatic

Received when a user in a subscribed voice channel stops speaking.

Scopes required: rpc.voice.read

Exceptions
InvalidOperationException
CommandException

◆ ThermalStateUpdate()

static async Task< DiscordSubscription > Dissonity.Api.Subscribe.ThermalStateUpdate ( Action< ThermalStateType > listener)
inlinestatic

Received when Android or iOS thermal states are surfaced to the Discord mobile app.

No scopes required.

Exceptions
InvalidOperationException
CommandException

◆ VoiceStateUpdate()

static async Task< DiscordSubscription > Dissonity.Api.Subscribe.VoiceStateUpdate ( long channelId,
Action< UserVoiceState > listener )
inlinestatic

Received when a user's voice state changes in a subscribed voice channel (mute, volume, etc).

Scopes required: rpc.voice.read

Exceptions
InvalidOperationException
CommandException

The documentation for this class was generated from the following file: