Class BaseDiscordClient
Inheritance
System.Object
BaseDiscordClient
Implements
System.IDisposable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Discord.Net.Rest.dll
Syntax
public abstract class BaseDiscordClient : IDiscordClient, IDisposable
Properties
|
Improve this Doc
View Source
CurrentUser
Declaration
public ISelfUser CurrentUser { get; protected set; }
Property Value
|
Improve this Doc
View Source
LoginState
Gets the login state of the client.
Declaration
public LoginState LoginState { get; }
Property Value
|
Improve this Doc
View Source
TokenType
Declaration
public TokenType TokenType { get; }
Property Value
Methods
|
Improve this Doc
View Source
Dispose()
Declaration
|
Improve this Doc
View Source
GetRecommendedShardCountAsync(RequestOptions)
Declaration
public Task<int> GetRecommendedShardCountAsync(RequestOptions options = null)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Int32> |
|
|
Improve this Doc
View Source
LoginAsync(TokenType, String, Boolean)
Declaration
public Task LoginAsync(TokenType tokenType, string token, bool validateToken = true)
Parameters
| Type |
Name |
Description |
| TokenType |
tokenType |
|
| System.String |
token |
|
| System.Boolean |
validateToken |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
LogoutAsync()
Declaration
public Task LogoutAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Events
|
Improve this Doc
View Source
Log
Declaration
public event Func<LogMessage, Task> Log
Event Type
| Type |
Description |
| System.Func<LogMessage, System.Threading.Tasks.Task> |
|
|
Improve this Doc
View Source
LoggedIn
Declaration
public event Func<Task> LoggedIn
Event Type
| Type |
Description |
| System.Func<System.Threading.Tasks.Task> |
|
|
Improve this Doc
View Source
LoggedOut
Declaration
public event Func<Task> LoggedOut
Event Type
| Type |
Description |
| System.Func<System.Threading.Tasks.Task> |
|
Explicit Interface Implementations
|
Improve this Doc
View Source
IDiscordClient.ConnectionState
Declaration
ConnectionState IDiscordClient.ConnectionState { get; }
Returns
|
Improve this Doc
View Source
IDiscordClient.CreateGuildAsync(String, IVoiceRegion, Stream, RequestOptions)
Declaration
Task<IGuild> IDiscordClient.CreateGuildAsync(string name, IVoiceRegion region, Stream jpegIcon, RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<IGuild> |
|
Exceptions
| Type |
Condition |
| System.NotSupportedException |
Creating a guild is not supported with the base client.
|
|
Improve this Doc
View Source
IDiscordClient.CurrentUser
Declaration
ISelfUser IDiscordClient.CurrentUser { get; }
Returns
|
Improve this Doc
View Source
IDiscordClient.GetApplicationInfoAsync(RequestOptions)
Declaration
Task<IApplication> IDiscordClient.GetApplicationInfoAsync(RequestOptions options)
Parameters
Returns
|
Improve this Doc
View Source
IDiscordClient.GetChannelAsync(UInt64, CacheMode, RequestOptions)
Declaration
Task<IChannel> IDiscordClient.GetChannelAsync(ulong id, CacheMode mode, RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<IChannel> |
|
|
Improve this Doc
View Source
IDiscordClient.GetConnectionsAsync(RequestOptions)
Declaration
Task<IReadOnlyCollection<IConnection>> IDiscordClient.GetConnectionsAsync(RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<IConnection>> |
|
|
Improve this Doc
View Source
IDiscordClient.GetDMChannelsAsync(CacheMode, RequestOptions)
Declaration
Task<IReadOnlyCollection<IDMChannel>> IDiscordClient.GetDMChannelsAsync(CacheMode mode, RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<IDMChannel>> |
|
|
Improve this Doc
View Source
IDiscordClient.GetGroupChannelsAsync(CacheMode, RequestOptions)
Declaration
Task<IReadOnlyCollection<IGroupChannel>> IDiscordClient.GetGroupChannelsAsync(CacheMode mode, RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<IGroupChannel>> |
|
|
Improve this Doc
View Source
IDiscordClient.GetGuildAsync(UInt64, CacheMode, RequestOptions)
Declaration
Task<IGuild> IDiscordClient.GetGuildAsync(ulong id, CacheMode mode, RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<IGuild> |
|
|
Improve this Doc
View Source
IDiscordClient.GetGuildsAsync(CacheMode, RequestOptions)
Declaration
Task<IReadOnlyCollection<IGuild>> IDiscordClient.GetGuildsAsync(CacheMode mode, RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<IGuild>> |
|
|
Improve this Doc
View Source
IDiscordClient.GetInviteAsync(String, RequestOptions)
Declaration
Task<IInvite> IDiscordClient.GetInviteAsync(string inviteId, RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<IInvite> |
|
|
Improve this Doc
View Source
IDiscordClient.GetPrivateChannelsAsync(CacheMode, RequestOptions)
Declaration
Task<IReadOnlyCollection<IPrivateChannel>> IDiscordClient.GetPrivateChannelsAsync(CacheMode mode, RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<IPrivateChannel>> |
|
|
Improve this Doc
View Source
IDiscordClient.GetUserAsync(String, String, RequestOptions)
Declaration
Task<IUser> IDiscordClient.GetUserAsync(string username, string discriminator, RequestOptions options)
Parameters
| Type |
Name |
Description |
| System.String |
username |
|
| System.String |
discriminator |
|
| RequestOptions |
options |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<IUser> |
|
|
Improve this Doc
View Source
IDiscordClient.GetUserAsync(UInt64, CacheMode, RequestOptions)
Declaration
Task<IUser> IDiscordClient.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<IUser> |
|
|
Improve this Doc
View Source
IDiscordClient.GetVoiceRegionAsync(String, RequestOptions)
Declaration
Task<IVoiceRegion> IDiscordClient.GetVoiceRegionAsync(string id, RequestOptions options)
Parameters
Returns
|
Improve this Doc
View Source
IDiscordClient.GetVoiceRegionsAsync(RequestOptions)
Declaration
Task<IReadOnlyCollection<IVoiceRegion>> IDiscordClient.GetVoiceRegionsAsync(RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<IVoiceRegion>> |
|
|
Improve this Doc
View Source
IDiscordClient.GetWebhookAsync(UInt64, RequestOptions)
Declaration
Task<IWebhook> IDiscordClient.GetWebhookAsync(ulong id, RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<IWebhook> |
|
|
Improve this Doc
View Source
IDiscordClient.StartAsync()
Declaration
Task IDiscordClient.StartAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
IDiscordClient.StopAsync()
Declaration
Task IDiscordClient.StopAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Implements
System.IDisposable
Extension Methods