[Feature] Selects v2 support (#2507)
* 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>
This commit is contained in:
@@ -5,6 +5,7 @@ using Discord.Net.Converters;
|
||||
using Discord.Net.Udp;
|
||||
using Discord.Net.WebSockets;
|
||||
using Discord.Rest;
|
||||
using Discord.Utils;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
@@ -2394,7 +2395,7 @@ namespace Discord.WebSocket
|
||||
await TimedInvokeAsync(_slashCommandExecuted, nameof(SlashCommandExecuted), slashCommand).ConfigureAwait(false);
|
||||
break;
|
||||
case SocketMessageComponent messageComponent:
|
||||
if (messageComponent.Data.Type == ComponentType.SelectMenu)
|
||||
if (messageComponent.Data.Type.IsSelectType())
|
||||
await TimedInvokeAsync(_selectMenuExecuted, nameof(SelectMenuExecuted), messageComponent).ConfigureAwait(false);
|
||||
if (messageComponent.Data.Type == ComponentType.Button)
|
||||
await TimedInvokeAsync(_buttonExecuted, nameof(ButtonExecuted), messageComponent).ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user