Comments (3)
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 F
type at all, just hardcode it as Id
in most places.
If I did add some sort of annotation macro, it would probably just be syntactic sugar for the above.
from ackcord.
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.
from ackcord.
New commands API is now the default. Old API is being phased out
from ackcord.
Related Issues (20)
- module not found: com.sedmelluq#lavaplayer;1.3.10 HOT 2
- [Suggestion?] A Higher-leveled /modular command framework for AckCord HOT 1
- Ban Reason does not get URL-Encoded HOT 1
- When a user send a message I want to reply to the message and send a DM HOT 1
- Removing a bot leads to an error parsing such message
- Weird exception logged for no reason HOT 3
- Error in stage Upstream producer failed with exception, removing from MergeHub now HOT 5
- ERROR: actor name [GatewayHandler] is not unique! HOT 2
- Rate Limiter never releases once rate limit is hit HOT 8
- Member add/update events not being triggered HOT 4
- Avatar is incorrectly marked as not nullable for webhooks
- DecodingFailure at .t: Invalid message type
- user param doesn't work
- Autocomplete errors if the user doesn't enter anything
- Example not compiling HOT 1
- Components not being registered
- RawChannel has no entry in CacheTypeRegistry
- Mentionable is hardcoded to user
- Verifier IndexOutOfBoundsException issues HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ackcord.