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

Resolve mutability issues with EmbedBuilder. #1010

Merged
merged 2 commits into from
Mar 30, 2018

Conversation

AntiTcb
Copy link
Collaborator

@AntiTcb AntiTcb commented Mar 30, 2018

Currently, this happens.

var eb = new EmbedBuilder().WithTitle("test");
var e = eb.Build();   
eb.WithTitle("test 2"); // e.Title is now "test 2"

Let's resolve that by putting all of the state on the builders and creating a new embed object on each build call.

@foxbot foxbot merged commit 2988b38 into discord-net:dev Mar 30, 2018
FiniteReality pushed a commit to FiniteReality/Discord.Net that referenced this pull request May 5, 2018
* Create new entities on each build call. Added Length property to EmbedBuilder.

* Resolve Length issues per discord-net#1012
@AntiTcb AntiTcb deleted the immutabilitywhatsthat branch October 25, 2018 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants