serenity
serenity copied to clipboard
Deprecate standard_framework
Trusty old standard_framework has been serenity's way of supporting textual commands for ages. Now, Discord is phasing out textual commands in favor of slash commands and new bots should preferably only use slash commands. The design of standard_framework is badly suited to support slash commands, and there's also a bunch of historical baggage with it, so it should be deprecated.
As alternative, I made another framework called poise which supports both textual and slash commands and is built on top of serenity as a separate crate. It has become relatively popular, so it's probably a good candidate for an official successor of the framework?
List of open standard_framework bug issues: #2080, #1775, #1773, #1741, #1735, #1644, #1532, #1520, #1453, #1289, #875, #868, #802 (these could potentially be closed as wontfix when standard_framework is deprecated?) List of issues about overhauling the framework: #1724, #1462, #1145, #804
What are others opinion on this topic?
Before we move to slash commands, i think the api for parsing arguments needs to be more ergonomic.
The framework successor, e.g. poise, would fill that role.
Poise has been moved into the serenity-rs organization https://github.com/serenity-rs/poise/
I meant this just as a heads-up, not as a closing request 😅 I think this issue should be closed only when standard_framework deprecation has either been accomplished (including migration guides etc.) or decided against
If the deprecation goes through, it should stay deprecated through the next major release (0.12), and only be removed in the release following it (0.13). Since it's a large feature, I think we should give users time to migrate over to using poise.
~~Or, should we deprecate it in a minor release of 0.11, and remove it in 0.12? What are your thoughts?~~
I agree. Keeping standard_framework is hardly any maintaining efforts
Deprecation will involve removing example crates that showcase standard_framework:
- e05_command_framework
- e06_sample_bot_structure
And overhauling example crates that make use of standard_framework, to use just raw EventHandler:
- e07_env_logging
- e10_collectors
- e12_global_data
- e15_simple_dashboard
And also remove e14_slash_commands because its ad-hoc slash command system is superseded by poise.
I don't think this should be removed at all (from Serenity) until support for variadic arguments in slash-commands is introduced.
variadic commands will never be supported @CmdrSharp and msg content intents make it hard to even support prefix
variadic commands will never be supported @CmdrSharp and msg content intents make it hard to even support prefix
I recall reading that variadic arguments are part of the slash command roadmap for Discord.
variadic commands will never be supported @CmdrSharp and msg content intents make it hard to even support prefix
I recall reading that variadic arguments are part of the slash command roadmap for Discord.
oh, didnt know that, seems like one of those things that'll never actually happen lol
This has been completed on the current branch, to be released as the next release of the 0.12 branch. Poise will be integrated into serenity 0.13, but for now users should migrate to the separate poise library to ease their transition.