@@ -16,7 +16,7 @@ namespace Discord | |||||
/// <see href="https://discord.com/developers/docs/reference#api-versioning">Discord API documentation</see> | /// <see href="https://discord.com/developers/docs/reference#api-versioning">Discord API documentation</see> | ||||
/// .</para> | /// .</para> | ||||
/// </returns> | /// </returns> | ||||
public const int APIVersion = 6; | |||||
public const int APIVersion = 9; | |||||
/// <summary> | /// <summary> | ||||
/// Returns the Voice API version Discord.Net uses. | /// Returns the Voice API version Discord.Net uses. | ||||
/// </summary> | /// </summary> | ||||
@@ -43,7 +43,7 @@ namespace Discord | |||||
/// <returns> | /// <returns> | ||||
/// The user agent used in each Discord.Net request. | /// The user agent used in each Discord.Net request. | ||||
/// </returns> | /// </returns> | ||||
public static string UserAgent { get; } = $"DiscordBot (https://github.com/RogueException/Discord.Net, v{Version})"; | |||||
public static string UserAgent { get; } = $"DiscordBot (https://github.com/discord-net/Discord.Net, v{Version})"; | |||||
/// <summary> | /// <summary> | ||||
/// Returns the base Discord API URL. | /// Returns the base Discord API URL. | ||||
/// </summary> | /// </summary> | ||||
@@ -141,18 +141,6 @@ namespace Discord | |||||
/// </remarks> | /// </remarks> | ||||
internal bool DisplayInitialLog { get; set; } = true; | internal bool DisplayInitialLog { get; set; } = true; | ||||
/// <summary> | |||||
/// Gets or sets the level of precision of the rate limit reset response. | |||||
/// </summary> | |||||
/// <remarks> | |||||
/// If set to <see cref="RateLimitPrecision.Second"/>, this value will be rounded up to the | |||||
/// nearest second. | |||||
/// </remarks> | |||||
/// <returns> | |||||
/// The currently set <see cref="RateLimitPrecision"/>. | |||||
/// </returns> | |||||
public RateLimitPrecision RateLimitPrecision { get; set; } = RateLimitPrecision.Millisecond; | |||||
/// <summary> | /// <summary> | ||||
/// Gets or sets whether or not rate-limits should use the system clock. | /// Gets or sets whether or not rate-limits should use the system clock. | ||||
/// </summary> | /// </summary> | ||||
@@ -39,5 +39,16 @@ namespace Discord | |||||
DirectMessageReactions = 1 << 13, | DirectMessageReactions = 1 << 13, | ||||
/// <summary> This intent includes TYPING_START </summary> | /// <summary> This intent includes TYPING_START </summary> | ||||
DirectMessageTyping = 1 << 14, | DirectMessageTyping = 1 << 14, | ||||
/// <summary> | |||||
/// This intent includes all but <see cref="GuildMembers"/> and <see cref="GuildMembers"/> | |||||
/// that are privileged must be enabled for the application. | |||||
/// </summary> | |||||
AllUnprivileged = Guilds | GuildBans | GuildEmojis | GuildIntegrations | GuildWebhooks | GuildInvites | | |||||
GuildVoiceStates | GuildMessages | GuildMessageReactions | GuildMessageTyping | DirectMessages | | |||||
DirectMessageReactions | DirectMessageTyping, | |||||
/// <summary> | |||||
/// This intent includes all of them, including privileged ones. | |||||
/// </summary> | |||||
All = AllUnprivileged | GuildMembers | GuildPresences | |||||
} | } | ||||
} | } |
@@ -127,12 +127,6 @@ namespace Discord.WebSocket | |||||
/// </remarks> | /// </remarks> | ||||
public bool? ExclusiveBulkDelete { get; set; } = null; | public bool? ExclusiveBulkDelete { get; set; } = null; | ||||
/// <summary> | |||||
/// Gets or sets enabling dispatching of guild subscription events e.g. presence and typing events. | |||||
/// This is not used if <see cref="GatewayIntents"/> are provided. | |||||
/// </summary> | |||||
public bool GuildSubscriptions { get; set; } = true; | |||||
/// <summary> | /// <summary> | ||||
/// Gets or sets the maximum identify concurrency. | /// Gets or sets the maximum identify concurrency. | ||||
/// </summary> | /// </summary> | ||||
@@ -172,14 +166,15 @@ namespace Discord.WebSocket | |||||
private int maxWaitForGuildAvailable = 10000; | private int maxWaitForGuildAvailable = 10000; | ||||
/// <summary> | /// <summary> | ||||
/// Gets or sets gateway intents to limit what events are sent from Discord. Allows for more granular control than the <see cref="GuildSubscriptions"/> property. | |||||
/// Gets or sets gateway intents to limit what events are sent from Discord. | |||||
/// The default is <see cref="GatewayIntents.AllUnprivileged"/>. | |||||
/// </summary> | /// </summary> | ||||
/// <remarks> | /// <remarks> | ||||
/// For more information, please see | /// For more information, please see | ||||
/// <see href="https://discord.com/developers/docs/topics/gateway#gateway-intents">GatewayIntents</see> | /// <see href="https://discord.com/developers/docs/topics/gateway#gateway-intents">GatewayIntents</see> | ||||
/// on the official Discord API documentation. | /// on the official Discord API documentation. | ||||
/// </remarks> | /// </remarks> | ||||
public GatewayIntents? GatewayIntents { get; set; } | |||||
public GatewayIntents GatewayIntents { get; set; } = GatewayIntents.AllUnprivileged; | |||||
/// <summary> | /// <summary> | ||||
/// Initializes a new instance of the <see cref="DiscordSocketConfig"/> class with the default configuration. | /// Initializes a new instance of the <see cref="DiscordSocketConfig"/> class with the default configuration. | ||||