Kord Extensions #139
gdude2002
started this conversation in
Community frameworks
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We've finally gotten around to doing proper versioning and releases - so why not be the first to post here as well?
Kord Extensions
Kord Extensions is an addon library for Kord, which is genuinely my favourite Kotlin library. It intends to provide a framework for larger bot projects, with easy-to-use commands, rich argument parsing and event handling, wrapped up into individual extension classes.
The approach taken here is relatively different from a lot of Kotlin libraries, many of which prefer to provide a DSL for quickly prototyping or implementing a small application. Instead, Discord.py (the Discord library for Python) is a primary source of inspiration for our fairly object-oriented design, especially where it comes to its extensions (which are known as cogs in Discord.py). Despite this, we still strive to provide an idiomatic API that makes full use of Kotlin's niceties.
If you're ready to get started, please take a look at the documentation.
Why not kordx.commands?
Kord has released their own command framework, kordx.commands. It's a competent library, but it takes some very different approaches to solving the same problems Kord Extensions does. Most notably, it requires the use of kapt and makes use of an annotation-based autowire system for getting things registered.
In contrast, Kord Extensions provides a less magical approach that is more closely tied to object-oriented programming, and may be more suitable for embedding into other applications. In addition, it provides many useful utilities and niceties that make working with Kord a breeze. At the end of the day, though, the choice is yours - both approaches have pros and cons, and it's worth checking both out to see what you like better!
Beta Was this translation helpful? Give feedback.
All reactions