Added Login/Logout events, Logout method and skip token validate to ref
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
using Discord.Net;
|
using Discord.Net.Rest;
|
||||||
using Discord.Net.Rest;
|
|
||||||
using Discord.Net.WebSockets;
|
using Discord.Net.WebSockets;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@@ -13,7 +11,9 @@ namespace Discord
|
|||||||
/// <summary> Provides a connection to the DiscordApp service. </summary>
|
/// <summary> Provides a connection to the DiscordApp service. </summary>
|
||||||
public class DiscordClient : IDisposable
|
public class DiscordClient : IDisposable
|
||||||
{
|
{
|
||||||
public event EventHandler Ready = delegate { };
|
public event EventHandler LoggedIn = delegate { };
|
||||||
|
public event EventHandler LoggedOut = delegate { };
|
||||||
|
public event EventHandler<LogMessageEventArgs> Log = delegate { };
|
||||||
public event EventHandler<ChannelEventArgs> ChannelCreated = delegate { };
|
public event EventHandler<ChannelEventArgs> ChannelCreated = delegate { };
|
||||||
public event EventHandler<ChannelUpdatedEventArgs> ChannelUpdated = delegate { };
|
public event EventHandler<ChannelUpdatedEventArgs> ChannelUpdated = delegate { };
|
||||||
public event EventHandler<ChannelEventArgs> ChannelDestroyed = delegate { };
|
public event EventHandler<ChannelEventArgs> ChannelDestroyed = delegate { };
|
||||||
@@ -39,11 +39,10 @@ namespace Discord
|
|||||||
public event EventHandler<UserEventArgs> UserUnbanned = delegate { };
|
public event EventHandler<UserEventArgs> UserUnbanned = delegate { };
|
||||||
|
|
||||||
public DiscordConfig Config { get; }
|
public DiscordConfig Config { get; }
|
||||||
public RestClient ClientAPI { get; }
|
public IRestClient ClientAPI { get; }
|
||||||
public RestClient StatusAPI { get; }
|
public IRestClient StatusAPI { get; }
|
||||||
public GatewaySocket GatewaySocket { get; }
|
public GatewaySocket GatewaySocket { get; }
|
||||||
public MessageQueue MessageQueue { get; }
|
public MessageQueue MessageQueue { get; }
|
||||||
public JsonSerializer Serializer { get; }
|
|
||||||
|
|
||||||
public ConnectionState State { get; }
|
public ConnectionState State { get; }
|
||||||
public CancellationToken CancelToken { get; }
|
public CancellationToken CancelToken { get; }
|
||||||
@@ -60,9 +59,13 @@ namespace Discord
|
|||||||
public DiscordClient(DiscordConfig config) { }
|
public DiscordClient(DiscordConfig config) { }
|
||||||
public DiscordClient(Action<DiscordConfig> configFunc) { }
|
public DiscordClient(Action<DiscordConfig> configFunc) { }
|
||||||
|
|
||||||
public Task<string> Connect(string email, string password, string token = null) => null;
|
public Task<string> Login(string email, string password, string token = null) => null;
|
||||||
|
public Task Login(string token, bool validate = true) => null;
|
||||||
|
public Task Logout() => null;
|
||||||
|
|
||||||
|
/*public Task<string> Connect(string email, string password, string token = null) => null;
|
||||||
public Task Connect(string token) => null;
|
public Task Connect(string token) => null;
|
||||||
public Task Disconnect() => null;
|
public Task Disconnect() => null;*/
|
||||||
|
|
||||||
public void SetStatus(UserStatus status) { }
|
public void SetStatus(UserStatus status) { }
|
||||||
public void SetGame(string game) { }
|
public void SetGame(string game) { }
|
||||||
|
|||||||
Reference in New Issue
Block a user