Use ApplicationId for interactions (#2044)
This commit is contained in:
18
src/Discord.Net.WebSocket/API/Gateway/PartialApplication.cs
Normal file
18
src/Discord.Net.WebSocket/API/Gateway/PartialApplication.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Discord.API.Gateway
|
||||
{
|
||||
internal class PartialApplication
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
|
||||
[JsonProperty("flags")]
|
||||
public ApplicationFlags Flags { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,8 @@ namespace Discord.API.Gateway
|
||||
public Channel[] PrivateChannels { get; set; }
|
||||
[JsonProperty("relationships")]
|
||||
public Relationship[] Relationships { get; set; }
|
||||
[JsonProperty("application")]
|
||||
public PartialApplication Application { get; set; }
|
||||
|
||||
//Ignored
|
||||
/*[JsonProperty("user_settings")]
|
||||
|
||||
@@ -870,6 +870,7 @@ namespace Discord.WebSocket
|
||||
var activities = _activity.IsSpecified ? ImmutableList.Create(_activity.Value) : null;
|
||||
currentUser.Presence = new SocketPresence(Status, null, activities);
|
||||
ApiClient.CurrentUserId = currentUser.Id;
|
||||
ApiClient.CurrentApplicationId = data.Application.Id;
|
||||
Rest.CurrentUser = RestSelfUser.Create(this, data.User);
|
||||
int unavailableGuilds = 0;
|
||||
for (int i = 0; i < data.Guilds.Length; i++)
|
||||
|
||||
Reference in New Issue
Block a user