kangalio

Results 246 comments of kangalio

Thank you for the report https://github.com/serenity-rs/poise/blob/5d02b8757d30e4588c193c5ba06e38806bbc1021/src/dispatch/slash.rs#L6-L32 I think the problem is here - subcommands are only traversed when the interaction has a subcommand too

This is a bug in poise, not your crate, but you can work around the bug by having two seperate functions for the slash version and the context menu version...

To make the slash and prefix implementation of a single command different, you're supposed to overwrite the Command.slash_action or Command.prefix_action fields instead of having two wholly separate commands. An example...

Action plan should be: - document somewhere™ that you should make different command impls by defining the command signature twice and consolidating them into one by overwriting slash_action or prefix_action...

I dislike how that obscures that "merging command" is just exchanging a single field. `poise::Command { slash_action: slash_impl().slash_action, ..prefix_impl() }` also makes clearer which of the two impls the other...

I attempted something similar before, I think it could be made to work. For motivation purposes and curiosity - what would you need a string-to-command converter for?

Yeah, that's the only use I can think of either. You can see my attempt from two years ago here in [this todo card](https://github.com/serenity-rs/poise/projects/1#card-70592668) and [this commit](https://github.com/serenity-rs/poise/commit/9d4dd61796aff41cf6c8f8c81f7c92be4b03ba40)

Using strip_prefix to check whether a message is a command would give false positives... - if the message is from the bot itself and execute_self_messages isn't set - if the...

Implemented in https://github.com/serenity-rs/poise/commit/1f0abfbc4c6d79af62867ff94fe79f5ae4fe6f8f. Feel free to try it in your bot via a cargo git dependency ^^

> do you also want to save the offset back to the file? Two of three suggested implementation approaches would involve that, yes. But perhaps the approach that leaves song...