mirror of
https://github.com/ION606/Discord-Client.git
synced 2026-05-14 21:06:55 +00:00
42 lines
1008 B
C#
42 lines
1008 B
C#
|
|
using System.Text.Json.Nodes;
|
||
|
|
using System.Threading.Tasks;
|
||
|
|
|
||
|
|
namespace Discord_Client_Custom
|
||
|
|
{
|
||
|
|
internal class user
|
||
|
|
{
|
||
|
|
private static string uid;
|
||
|
|
private static string username;
|
||
|
|
private static string discriminator;
|
||
|
|
private static string avatar;
|
||
|
|
private static string? nickname = null;
|
||
|
|
|
||
|
|
public user(JsonNode specs)
|
||
|
|
{
|
||
|
|
uid = (string)specs["id"];
|
||
|
|
username = (string)specs["username"];
|
||
|
|
discriminator = (string)specs["discriminator"];
|
||
|
|
avatar = (string)specs["avatar"];
|
||
|
|
}
|
||
|
|
|
||
|
|
public string getUserName()
|
||
|
|
{
|
||
|
|
return username;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
public string getAvatar()
|
||
|
|
{
|
||
|
|
return avatar;
|
||
|
|
}
|
||
|
|
|
||
|
|
public string getId() { return uid; }
|
||
|
|
|
||
|
|
|
||
|
|
public string toString()
|
||
|
|
{
|
||
|
|
return "{\n\tuid: " + uid + "\n\tusername: " + username + "\n\tdiscriminator: " + discriminator + "\n\tavatar: " + avatar + "\n}";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|