feature: Add missing properties to Guild and deprecate GuildEmbed (#1573)
* Add missing properties to Guild, related methods, and deprecate GuildEmbed endpoints
- Add missing guild properties: `discovery_splash`, `widget_enabled`, `widget_channel_id`, `rules_channel_id`, `max_presences`, `max_presences`, `max_members`, `public_updates_channel_id`, `max_video_channel_users`, `approximate_member_count`, `approximate_presence_count`
- Update guild properties: `embed_enabled`, `embed_channel_id`
- Add `GetGuildDiscoverySplashUrl` to `CDN`
- Add classes related to the guild widget
- Add `withCounts` parameter to `GetGuild(s)Async`
- Make GuildEmbed related methods obsolete with a message redirecting to widget ones
* Change xml docs and PremiumSubscriptionCount type
* Changed some xml docs
/// An identifier for the splash image; <c>null</c> if none is set.
/// An identifier for the splash image; <see langword="null" /> if none is set.
/// </returns>
string IconId { get; }
/// <summary>
/// Gets the URL of this guild's icon.
/// </summary>
/// <returns>
/// A URL pointing to the guild's icon; <c>null</c> if none is set.
/// A URL pointing to the guild's icon; <see langword="null" /> if none is set.
/// </returns>
string IconUrl { get; }
/// <summary>
/// Gets the ID of this guild's splash image.
/// </summary>
/// <returns>
/// An identifier for the splash image; <c>null</c> if none is set.
/// An identifier for the splash image; <see langword="null" /> if none is set.
/// </returns>
string SplashId { get; }
/// <summary>
/// Gets the URL of this guild's splash image.
/// </summary>
/// <returns>
/// A URL pointing to the guild's splash image; <c>null</c> if none is set.
/// A URL pointing to the guild's splash image; <see langword="null" /> if none is set.
/// </returns>
string SplashUrl { get; }
/// <summary>
/// Gets the ID of this guild's discovery splash image.
/// </summary>
/// <returns>
/// An identifier for the discovery splash image; <see langword="null" /> if none is set.
/// </returns>
string DiscoverySplashId { get; }
/// <summary>
/// Gets the URL of this guild's discovery splash image.
/// </summary>
/// <returns>
/// A URL pointing to the guild's discovery splash image; <see langword="null" /> if none is set.
/// </returns>
string DiscoverySplashUrl { get; }
/// <summary>
/// Determines if this guild is currently connected and ready to be used.
/// </summary>
/// <remarks>
@@ -98,7 +119,7 @@ namespace Discord
/// This boolean is used to determine if the guild is currently connected to the WebSocket and is ready to be used/accessed.
/// </remarks>
/// <returns>
/// <c>true</c> if this guild is currently connected and ready to be used; otherwise <c>false</c>.
/// <c>true</c> if this guild is currently connected and ready to be used; otherwise <see langword="false"/>.
/// </returns>
bool Available { get; }
@@ -106,7 +127,7 @@ namespace Discord
/// Gets the ID of the AFK voice channel for this guild.
/// </summary>
/// <returns>
/// A <see cref="ulong"/> representing the snowflake identifier of the AFK voice channel; <c>null</c> if
/// A <see langword="ulong"/> representing the snowflake identifier of the AFK voice channel; <see langword="null" /> if
/// none is set.
/// </returns>
ulong? AFKChannelId { get; }
@@ -121,7 +142,7 @@ namespace Discord
/// </note>
/// </remarks>
/// <returns>
/// A <see cref="ulong"/> representing the snowflake identifier of the default text channel; <c>0</c> if
/// A <see langword="ulong"/> representing the snowflake identifier of the default text channel; <c>0</c> if
/// none can be found.
/// </returns>
ulong DefaultChannelId { get; }
@@ -129,30 +150,54 @@ namespace Discord
/// Gets the ID of the widget embed channel of this guild.
/// </summary>
/// <returns>
/// A <see cref="ulong"/> representing the snowflake identifier of the embedded channel found within the
/// widget settings of this guild; <c>null</c> if none is set.
/// A <see langword="ulong"/> representing the snowflake identifier of the embedded channel found within the
/// widget settings of this guild; <see langword="null" /> if none is set.
/// </returns>
ulong? EmbedChannelId { get; }
/// <summary>
/// Gets the ID of the channel assigned to the widget of this guild.
/// </summary>
/// <returns>
/// A <see langword="ulong"/> representing the snowflake identifier of the channel assigned to the widget found
/// within the widget settings of this guild; <see langword="null" /> if none is set.
/// </returns>
ulong? WidgetChannelId { get; }
/// <summary>
/// Gets the ID of the channel where randomized welcome messages are sent.
/// </summary>
/// <returns>
/// A <see cref="ulong"/> representing the snowflake identifier of the system channel where randomized
/// welcome messages are sent; <c>null</c> if none is set.
/// A <see langword="ulong"/> representing the snowflake identifier of the system channel where randomized
/// welcome messages are sent; <see langword="null" /> if none is set.
/// </returns>
ulong? SystemChannelId { get; }
/// <summary>
/// Gets the ID of the channel with the rules.
/// </summary>
/// <returns>
/// A <see langword="ulong"/> representing the snowflake identifier of the channel that contains the rules;
/// <see langword="null" /> if none is set.
/// </returns>
ulong? RulesChannelId { get; }
/// <summary>
/// Gets the ID of the channel where admins and moderators of Community guilds receive notices from Discord.
/// </summary>
/// <returns>
/// A <see langword="ulong"/> representing the snowflake identifier of the channel where admins and moderators
/// of Community guilds receive notices from Discord; <see langword="null" /> if none is set.
/// </returns>
ulong? PublicUpdatesChannelId { get; }
/// <summary>
/// Gets the ID of the user that owns this guild.
/// </summary>
/// <returns>
/// A <see cref="ulong"/> representing the snowflake identifier of the user that owns this guild.
/// A <see langword="ulong"/> representing the snowflake identifier of the user that owns this guild.
/// </returns>
ulong OwnerId { get; }
/// <summary>
/// Gets the application ID of the guild creator if it is bot-created.
/// </summary>
/// <returns>
/// A <see cref="ulong"/> representing the snowflake identifier of the application ID that created this guild, or <c>null</c> if it was not bot-created.
/// A <see langword="ulong"/> representing the snowflake identifier of the application ID that created this guild, or <see langword="null" /> if it was not bot-created.
/// </returns>
ulong? ApplicationId { get; }
/// <summary>
@@ -208,21 +253,21 @@ namespace Discord
/// Gets the identifier for this guilds banner image.
/// </summary>
/// <returns>
/// An identifier for the banner image; <c>null</c> if none is set.
/// An identifier for the banner image; <see langword="null" /> if none is set.
/// </returns>
string BannerId { get; }
/// <summary>
/// Gets the URL of this guild's banner image.
/// </summary>
/// <returns>
/// A URL pointing to the guild's banner image; <c>null</c> if none is set.
/// A URL pointing to the guild's banner image; <see langword="null" /> if none is set.
/// </returns>
string BannerUrl { get; }
/// <summary>
/// Gets the code for this guild's vanity invite URL.
/// </summary>
/// <returns>
/// A string containing the vanity invite code for this guild; <c>null</c> if none is set.
/// A string containing the vanity invite code for this guild; <see langword="null" /> if none is set.
/// </returns>
string VanityURLCode { get; }
/// <summary>
@@ -236,7 +281,7 @@ namespace Discord
/// Gets the description for the guild.
/// </summary>
/// <returns>
/// The description for the guild; <c>null</c> if none is set.
/// The description for the guild; <see langword="null" /> if none is set.
/// </returns>
string Description { get; }
/// <summary>
@@ -246,9 +291,50 @@ namespace Discord
/// This is the number of users who have boosted this guild.
/// </remarks>
/// <returns>
/// The number of premium subscribers of this guild.
/// The number of premium subscribers of this guild; <see langword="null" /> if not available.
/// </returns>
int PremiumSubscriptionCount { get; }
/// <summary>
/// Gets the maximum number of presences for the guild.
/// </summary>
/// <returns>
/// The maximum number of presences for the guild.
/// </returns>
int? MaxPresences { get; }
/// <summary>
/// Gets the maximum number of members for the guild.
/// </summary>
/// <returns>
/// The maximum number of members for the guild.
/// </returns>
int? MaxMembers { get; }
/// <summary>
/// Gets the maximum amount of users in a video channel.
/// </summary>
/// <returns>
/// The maximum amount of users in a video channel.
/// </returns>
int? MaxVideoChannelUsers { get; }
/// <summary>
/// Gets the approximate number of members in this guild.
/// </summary>
/// <remarks>
/// Only available when getting a guild via REST when `with_counts` is true.
/// </remarks>
/// <returns>
/// The approximate number of members in this guild.
/// </returns>
int? ApproximateMemberCount { get; }
/// <summary>
/// Gets the approximate number of non-offline members in this guild.
/// </summary>
/// <remarks>
/// Only available when getting a guild via REST when `with_counts` is true.
/// </remarks>
/// <returns>
/// The approximate number of non-offline members in this guild.
/// </returns>
int? ApproximatePresenceCount { get; }
/// <summary>
/// Gets the preferred locale of this guild in IETF BCP 47
@@ -285,8 +371,18 @@ namespace Discord
/// <returns>
/// A task that represents the asynchronous modification operation.
/// </returns>
[Obsolete("This endpoint is deprecated, use ModifyWidgetAsync instead.")]
/// <param name="id">The snowflake identifier for the role.</param>
/// <returns>
/// A role that is associated with the specified <paramref name="id"/>; <c>null</c> if none is found.
/// A role that is associated with the specified <paramref name="id"/>; <see langword="null" /> if none is found.
/// </returns>
IRole GetRole(ulong id);
/// <summary>
@@ -624,7 +751,7 @@ namespace Discord
/// <param name="accessToken">The OAuth2 access token for the user, requested with the guilds.join scope.</param>
/// <param name="func">The delegate containing the properties to be applied to the user upon being added to the guild.</param>
/// <param name="options">The options to be used when sending the request.</param>
/// <returns>A guild user associated with the specified <paramref name="userId" />; <c>null</c> if the user is already in the guild.</returns>
/// <returns>A guild user associated with the specified <paramref name="userId" />; <see langword="null" /> if the user is already in the guild.</returns>
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.