public Login() { OnClientUpdated += (sender, e) => { User.SetClient(Client); Guilds.SetClientsInList(Client); Relationships.SetClientsInList(Client); PrivateChannels.SetClientsInList(Client); }; }
public Login() { OnClientUpdated += (sender, e) => { User.SetClient(Client); Guilds.SetClientsInList(Client); Relationships.SetClientsInList(Client); PrivateChannels.SetClientsInList(Client); }; JsonUpdated += (sender, json) => { Guilds = json.Value <JArray>("guilds").PopulateListJson <LoginGuild>(); }; }
internal Login() { OnClientUpdated += (sender, e) => { User.SetClient(Client); Guilds.SetClientsInList(Client); Relationships.SetClientsInList(Client); Settings.SetClient(Client); PrivateChannels.SetClientsInList(Client); ClientGuildSettings.SetClientsInList(Client); ConnectedAccounts.SetClientsInList(Client); Presences.SetClientsInList(Client); }; JsonUpdated += (sender, json) => { Guilds = json.Value <JArray>("guilds").PopulateListJson <LoginGuild>(); PrivateChannels = json.Value <JArray>("private_channels").PopulateListJson <PrivateChannel>(); Presences = json.Value <JArray>("presences").PopulateListJson <DiscordPresence>(); }; }
internal LoginEventArgs() { OnClientUpdated += (sender, e) => { User.SetClient(Client); Relationships.SetClientsInList(Client); Settings.SetClient(Client); PrivateChannels.SetClientsInList(Client); ClientGuildSettings.SetClientsInList(Client); ConnectedAccounts.SetClientsInList(Client); Presences.SetClientsInList(Client); List <MinimalGuild> guilds = new List <MinimalGuild>(); foreach (var obj in _guilds) { guilds.Add((Client.User.Type == DiscordUserType.User ? obj.ToObject <SocketGuild>() : obj.ToObject <MinimalGuild>()).SetClient(Client)); } Guilds = guilds; }; }