* Initial support for new select types
* Merge branch 'dev' of https://github.com/discord-net/Discord.Net into dev
* some component&action row builder additions
* remove redundant code
* changes1
* maybe working rest part?
* working-ish state?
* fix some xml docs & small rework
* typos
* fix `ActionRowBuilder`
* update DefaultArrayComponentConverter to accomodate new select-v2 types
* now supports dm channels in channel selects
* add a note to IF docs
* add notes about nullable properties
* <see langword="null"/>
* update Modal.cs
Co-authored-by: cat <lumitydev@gmail.com>
Co-authored-by: Cenngo <cenk.ergen1@gmail.com>
/// Gets the value(s) of a <see cref="SelectMenuComponent"/> interaction response.
/// Gets the value(s) of a <see cref="ComponentType.SelectMenu"/> interaction response. <see langword="null"/> if select type is different.
/// </summary>
IReadOnlyCollection<string> Values { get; }
/// <summary>
/// Gets the value of a <see cref="TextInputComponent"/> interaction response.
/// Gets the channels(s) of a <see cref="ComponentType.ChannelSelect"/> interaction response. <see langword="null"/> if select type is different.
/// </summary>
IReadOnlyCollection<IChannel> Channels { get; }
/// <summary>
/// Gets the user(s) of a <see cref="ComponentType.UserSelect"/> or <see cref="ComponentType.MentionableSelect"/> interaction response. <see langword="null"/> if select type is different.
/// </summary>
IReadOnlyCollection<IUser> Users { get; }
/// <summary>
/// Gets the roles(s) of a <see cref="ComponentType.RoleSelect"/> or <see cref="ComponentType.MentionableSelect"/> interaction response. <see langword="null"/> if select type is different.
/// </summary>
IReadOnlyCollection<IRole> Roles { get; }
/// <summary>
/// Gets the guild member(s) of a <see cref="ComponentType.UserSelect"/> or <see cref="ComponentType.MentionableSelect"/> interaction response. <see langword="null"/> if type select is different.
/// </summary>
IReadOnlyCollection<IGuildUser> Members { get; }
/// <summary>
/// Gets the value of a <see cref="ComponentType.TextInput"/> interaction response.
case ComponentType.SelectMenu or ComponentType.ChannelSelect or ComponentType.RoleSelect or ComponentType.MentionableSelect or ComponentType.UserSelect:
{
var parsed = (API.SelectMenuComponent)y;
return new SelectMenuComponent(
parsed.CustomId,
parsed.Options.Select(z => new SelectMenuOption(
parsed.Options?.Select(z => new SelectMenuOption(
z.Label,
z.Value,
z.Description.GetValueOrDefault(),
z.Emoji.IsSpecified
? z.Emoji.Value.Id.HasValue
? new Emote(z.Emoji.Value.Id.Value, z.Emoji.Value.Name, z.Emoji.Value.Animated.GetValueOrDefault())
: new Emoji(z.Emoji.Value.Name)
: null,
? z.Emoji.Value.Id.HasValue
? new Emote(z.Emoji.Value.Id.Value, z.Emoji.Value.Name, z.Emoji.Value.Animated.GetValueOrDefault())
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.