Browse Source

Bump to Discord API v10 (#2448)

* Bump, add messagecontent intent

* Update comments

Co-authored-by: Rozen <Rozen4334@outlook.com>
tags/3.8.1
Armano den Boef GitHub 2 years ago
parent
commit
370bdfa3c6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 3 deletions
  1. +1
    -1
      src/Discord.Net.Core/DiscordConfig.cs
  2. +6
    -0
      src/Discord.Net.Core/Entities/Messages/IMessage.cs
  3. +9
    -2
      src/Discord.Net.Core/GatewayIntents.cs

+ 1
- 1
src/Discord.Net.Core/DiscordConfig.cs View File

@@ -18,7 +18,7 @@ namespace Discord
/// <see href="https://discord.com/developers/docs/reference#api-versioning">Discord API documentation</see>
/// .</para>
/// </returns>
public const int APIVersion = 9;
public const int APIVersion = 10;
/// <summary>
/// Returns the Voice API version Discord.Net uses.
/// </summary>


+ 6
- 0
src/Discord.Net.Core/Entities/Messages/IMessage.cs View File

@@ -48,6 +48,9 @@ namespace Discord
/// <summary>
/// Gets the content for this message.
/// </summary>
/// <remarks>
/// This will be empty if the privileged <see cref="GatewayIntents.MessageContent"/> is disabled.
/// </remarks>
/// <returns>
/// A string that contains the body of the message; note that this field may be empty if there is an embed.
/// </returns>
@@ -55,6 +58,9 @@ namespace Discord
/// <summary>
/// Gets the clean content for this message.
/// </summary>
/// <remarks>
/// This will be empty if the privileged <see cref="GatewayIntents.MessageContent"/> is disabled.
/// </remarks>
/// <returns>
/// A string that contains the body of the message stripped of mentions, markdown, emojis and pings; note that this field may be empty if there is an embed.
/// </returns>


+ 9
- 2
src/Discord.Net.Core/GatewayIntents.cs View File

@@ -39,7 +39,14 @@ namespace Discord
DirectMessageReactions = 1 << 13,
/// <summary> This intent includes TYPING_START </summary>
DirectMessageTyping = 1 << 14,
/// <summary> This intent includes GUILD_SCHEDULED_EVENT_CREATE, GUILD_SCHEDULED_EVENT_UPDATE, GUILD_SCHEDULED_EVENT_DELETE, GUILD_SCHEDULED_EVENT_USER_ADD, GUILD_SCHEDULED_EVENT_USER_REMOVE </summary>
/// <summary>
/// This intent defines if the content within messages received by MESSAGE_CREATE is available or not.
/// This is a privileged intent and needs to be enabled in the developer portal.
/// </summary>
MessageContent = 1 << 15,
/// <summary>
/// This intent includes GUILD_SCHEDULED_EVENT_CREATE, GUILD_SCHEDULED_EVENT_UPDATE, GUILD_SCHEDULED_EVENT_DELETE, GUILD_SCHEDULED_EVENT_USER_ADD, GUILD_SCHEDULED_EVENT_USER_REMOVE
/// </summary>
GuildScheduledEvents = 1 << 16,
/// <summary>
/// This intent includes all but <see cref="GuildMembers"/> and <see cref="GuildPresences"/>
@@ -51,6 +58,6 @@ namespace Discord
/// <summary>
/// This intent includes all of them, including privileged ones.
/// </summary>
All = AllUnprivileged | GuildMembers | GuildPresences
All = AllUnprivileged | GuildMembers | GuildPresences | MessageContent
}
}

Loading…
Cancel
Save