Fix missing SelectMenu Type, ChannelTypes, DefaultValues in ComponentBuilder.AddComponent (#3186)

This commit is contained in:
OMEGA3065
2025-09-13 19:16:02 +02:00
committed by GitHub
parent 927c9053e4
commit 8883596c31
2 changed files with 2 additions and 2 deletions

View File

@@ -75,7 +75,7 @@ public class ComponentBuilder
AddComponent(cmp, row); AddComponent(cmp, row);
break; break;
case SelectMenuComponent menu: case SelectMenuComponent menu:
WithSelectMenu(menu.CustomId, menu.Options?.Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.IsDefault)).ToList(), menu.Placeholder, menu.MinValues, menu.MaxValues, menu.IsDisabled, row); WithSelectMenu(menu.CustomId, menu.Options?.Select(x => new SelectMenuOptionBuilder(x.Label, x.Value, x.Description, x.Emote, x.IsDefault)).ToList(), menu.Placeholder, menu.MinValues, menu.MaxValues, menu.IsDisabled, row, menu.Type, menu.ChannelTypes.ToArray(), menu.DefaultValues.ToArray());
break; break;
} }
} }

View File

@@ -36,7 +36,7 @@ namespace Discord.Net.Converters
case ComponentType.MentionableSelect: case ComponentType.MentionableSelect:
case ComponentType.RoleSelect: case ComponentType.RoleSelect:
case ComponentType.UserSelect: case ComponentType.UserSelect:
messageComponent = new API.SelectMenuComponent(); messageComponent = new API.SelectMenuComponent(){Type = (ComponentType)typeProperty};
break; break;
case ComponentType.TextInput: case ComponentType.TextInput:
messageComponent = new API.TextInputComponent(); messageComponent = new API.TextInputComponent();