serenity-rs / poise

Discord bot command framework for serenity, with advanced features like edit tracking and flexible argument parsing
MIT License
624 stars 111 forks source link

CreateReply does not contain set_embed/set_components [SOLVED] #228

Closed RoFred2 closed 9 months ago

RoFred2 commented 9 months ago

The title says it all.

kangalio commented 9 months ago

set_components() exists and is called components() (or what behavior would you expect from a method called set_components)?

set_embed indeed does not exist.. But I don't see what to use it for? I assume it would set a single embed, overwriting any previous embed. But why would you have a previous embed in a blank CreateReply builder? And without a previous embed, you can just use .embed()

Or did you mean set_embeds (plural)? That would be the most sensible of these three in my opinion, but I'm still unsure it is needed. create_reply.embeds = ... exists. It is not chainable, but are there cases where you want chainability but cannot use .embed()?

RoFred2 commented 9 months ago

set_components() exists and is called components() (or what behavior would you expect from a method called set_components)?

set_embed indeed does not exist.. But I don't see what to use it for? I assume it would set a single embed, overwriting any previous embed. But why would you have a previous embed in a blank CreateReply builder? And without a previous embed, you can just use .embed()

Or did you mean set_embeds (plural)? That would be the most sensible of these three in my opinion, but I'm still unsure it is needed. create_reply.embeds = ... exists. It is not chainable, but are there cases where you want chainability but cannot use .embed()?

I had the impression that .embeds would ADD to the current embeds instead of overwriting them, .components likewise. My bad

kangalio commented 9 months ago

Mind the plurals, please :grinning: it gets confusing otherwise

I had the impression that .embeds would ADD to the current embeds instead of overwriting them, .components likewise. My bad

.embeds() does not exist! .embed() does exist!

And yeah, the docs about .embed() and .components() are also relatively clear about their respective behavior:

Screenshot_20231129_204824