poise icon indicating copy to clipboard operation
poise copied to clipboard

create_application_commands can now take any IntoIterator: not just &[]

Open zkxs opened this issue 6 months ago • 6 comments

This is a small change: currently poise::builtins::create_application_commands takes a &[crate::Command<U, E>]. This PR changes it to take an IntoIterator<Item=&crate::Command<U, E>>. This doesn't really change much, except it makes the API slightly easier to work with if API users don't simply have a Vec<Command<U, E> lying around: for example if you're dynamically computing which commands should be set on a guild-by-guild basis.

zkxs avatar Aug 12 '24 09:08 zkxs