-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion?] A Higher-leveled /modular command framework for AckCord #14
Comments
I've been planning some in general higher level API on top of AckCord, but that's some way into the future. As for how commands will look, not sure. Probably won't go with annotation macros though because they play horrible with IntelliJ, and I have no idea how long they will stay alive. In the meantime though, there's always the slightly less verbose non raw commands. client.registerCmd[NotUsed, Id](
prefix = GeneralCommands,
aliases = Seq("ping"),
filters = Seq(CmdFilter.NonBot, CmdFilter.InGuild),
description = Some(CmdDescription("Ping", "Check if the bot is alive"))
) { _ =>
println(s"Received ping command}")
} Another option if you only care about the in memory cache is to not care about the If I did add some sort of annotation macro, it would probably just be syntactic sugar for the above. |
To give some update on the situation here. With 0.13 comes a new experimental commands API completely detached from the previous API. You can see the equivalent of a ping command here https://github.com/Katrix/AckCord/blob/master/exampleCore/src/main/scala/ackcord/examplecore/NewCommandsController.scala#L15 Do note that command registration is not yet as clean, but I got some plans for that too. |
New commands API is now the default. Old API is being phased out |
Other Discord libraries feature command frameworks that provide utilities that abstract over implementation details and/or boilerplate (usually using a decorator, annotation or some kind of off-handing mechanism) for example: [discord.py's commands extension]
(https://discordpy.readthedocs.io/en/rewrite/ext/commands/commands.html) which provides an easier and cleaner interface with the library.
In AckCord, The ping command is in itself quite verbose.
where-as using something such as an annotation macro (to avoid the using runtime-reflection)
The text was updated successfully, but these errors were encountered: