serenity icon indicating copy to clipboard operation
serenity copied to clipboard

Deprecate standard_framework

Open kangalio opened this issue 3 years ago • 1 comments
trafficstars

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

kangalio avatar Sep 17 '22 07:09 kangalio

What are others opinion on this topic?

kangalio avatar Sep 17 '22 07:09 kangalio

Before we move to slash commands, i think the api for parsing arguments needs to be more ergonomic.

royalmustard avatar Nov 14 '22 07:11 royalmustard

The framework successor, e.g. poise, would fill that role.

kangalio avatar Nov 14 '22 08:11 kangalio

Poise has been moved into the serenity-rs organization https://github.com/serenity-rs/poise/

kangalio avatar Nov 20 '22 21:11 kangalio

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

kangalio avatar Nov 20 '22 23:11 kangalio

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?~~

mkrasnitski avatar Nov 21 '22 05:11 mkrasnitski

I agree. Keeping standard_framework is hardly any maintaining efforts

kangalio avatar Nov 22 '22 19:11 kangalio

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.

kangalio avatar Apr 28 '23 11:04 kangalio

I don't think this should be removed at all (from Serenity) until support for variadic arguments in slash-commands is introduced.

CmdrSharp avatar May 30 '23 12:05 CmdrSharp

variadic commands will never be supported @CmdrSharp and msg content intents make it hard to even support prefix

cheesycod avatar May 30 '23 17:05 cheesycod

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.

CmdrSharp avatar May 30 '23 18:05 CmdrSharp

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

cheesycod avatar May 30 '23 18:05 cheesycod

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.

GnomedDev avatar Jan 26 '24 15:01 GnomedDev