|
@@ -5,6 +5,13 @@ using System.Text; |
|
|
|
|
|
|
|
|
namespace Discord |
|
|
namespace Discord |
|
|
{ |
|
|
{ |
|
|
|
|
|
public enum DiscordMode |
|
|
|
|
|
{ |
|
|
|
|
|
/// <summary> Enable bot-only functions. Use this mode if you are creating a bot, automated application, or interface. </summary> |
|
|
|
|
|
Bot = 0, |
|
|
|
|
|
/// <summary> Enables client-only functions. Use this mode if you are creating a custom client. </summary> |
|
|
|
|
|
Client |
|
|
|
|
|
} |
|
|
public enum LogSeverity : byte |
|
|
public enum LogSeverity : byte |
|
|
{ |
|
|
{ |
|
|
Error = 1, |
|
|
Error = 1, |
|
@@ -45,11 +52,13 @@ namespace Discord |
|
|
/// <summary> Enables or disables the default event logger. </summary> |
|
|
/// <summary> Enables or disables the default event logger. </summary> |
|
|
public bool LogEvents { get { return _logEvents; } set { SetValue(ref _logEvents, value); } } |
|
|
public bool LogEvents { get { return _logEvents; } set { SetValue(ref _logEvents, value); } } |
|
|
private bool _logEvents = true; |
|
|
private bool _logEvents = true; |
|
|
|
|
|
/// <summary> Specifies the mode that this application should run in. </summary> |
|
|
|
|
|
public DiscordMode Mode { get { return _mode; } set { SetValue(ref _mode, value); } } |
|
|
|
|
|
private DiscordMode _mode = DiscordMode.Bot; |
|
|
|
|
|
|
|
|
/// <summary> User Agent string to use when connecting to Discord. </summary> |
|
|
/// <summary> User Agent string to use when connecting to Discord. </summary> |
|
|
[JsonIgnore] |
|
|
[JsonIgnore] |
|
|
public string UserAgent { get { return _userAgent; } } |
|
|
|
|
|
private string _userAgent; |
|
|
|
|
|
|
|
|
public string UserAgent { get; private set; } |
|
|
|
|
|
|
|
|
//Rest |
|
|
//Rest |
|
|
|
|
|
|
|
@@ -120,7 +129,7 @@ namespace Discord |
|
|
builder.Append(' '); |
|
|
builder.Append(' '); |
|
|
} |
|
|
} |
|
|
builder.Append($"DiscordBot ({LibUrl}, v{LibVersion})"); |
|
|
builder.Append($"DiscordBot ({LibUrl}, v{LibVersion})"); |
|
|
_userAgent = builder.ToString(); |
|
|
|
|
|
|
|
|
UserAgent = builder.ToString(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |