Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix null error when using a SelectMenuBuilder constructor #2924

Merged
merged 2 commits into from
May 11, 2024
Merged

Fix null error when using a SelectMenuBuilder constructor #2924

merged 2 commits into from
May 11, 2024

Conversation

Hampo
Copy link
Contributor

@Hampo Hampo commented May 9, 2024

Description

Fixed a bug where Options can be set to null when using a specific SelectMenuBuilder constructor

Changes

  • Made Options be set to options ?? new()

Related Issues

Never created one

@Misha-133
Copy link
Member

Hey, thanks for the contribution, but that is in fact wrong. Options can be set to null and that is intended behavior

@Hampo
Copy link
Contributor Author

Hampo commented May 9, 2024

Hey, thanks for the contribution, but that is in fact wrong. Options can be set to null and that is intended behavior

Then should AddOption initialise the property if it's not set? What's the use case of a null Options?

@Misha-133
Copy link
Member

Then should AddOption initialise the property if it's not set?

Hm, yeah that would be correct, might be just an oversight in the current implementation

What's the use case of a null Options

auto-populated select menus (user, role, mentionable, channel)

@Hampo
Copy link
Contributor Author

Hampo commented May 9, 2024

Ah cool - I'll change this PR to update AddOption then

@Hampo
Copy link
Contributor Author

Hampo commented May 9, 2024

Updated another reference I found too

@Misha-133 Misha-133 merged commit 93cb71a into discord-net:dev May 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants