Free-Nations-Region / CyborgianStates

A (Discord-) Bot for all needs of a Region in NationStates
MIT License
0 stars 1 forks source link

[BUG]: BaseResponseBuilder does not Clear() #82

Closed jasonycin closed 1 year ago

jasonycin commented 2 years ago

Describe the bug The Clear() method in BaseResponseBuilder does not properly clear the title and description. The first steps to fixing this were taken in 2d5f3a2 but have not solved the solution.

To Reproduce Steps to reproduce the behavior:

  1. Create a new CommandResponse with a IResponseBuilder and register it to the serviceProvider.
  2. Set the WithTitle() and WithDescription() of the aforementioned IResponseBuilder and Build() it.
  3. Run Clear() on the aforementioned IResponseBuilder.
  4. Rerun step 2 w/out a new title or description. You will notice that they are still there.

Expected behavior Clear() is supposed to remove all properties and fields of an IResponseBuilder, allowing you to build a new response as if it were from scratch.

On which MessageHandler occurred the error (e.g. Console, Discord)?: Both.

Screenshots N/A

Additional context N/A