Releases: Katrix/AckCord
0.18.1
0.18.0
Additions
- API additions since the last release.
-
- Discord API v9
-
- Threads
-
- Application commands
-
- Interactions and components
- Add support for custom gateway events (hopefully this will rarely if ever be needed)
- Added gateway info to events
- Added method for bulk messages request
- Add methods for bulk member fetching using the gateway
- Create separate Akka-less gateway-data project (#43) (@Aly_Cerruti)
Changes
- Rely more on the cache when constructing events
- Rely less on the cache when constructing events if values are not in the cache
- More info on HttpException
- Abstracted Ratelimiter away behind a trait
- Update the ratelimiter to fight more actively against global ratelimits and 404s
And tons of other smaller updates
0.17.1
0.17.0
This release is all about improving core AckCord functions like the cache and gateway. It also finalizes the missing pieces from the new commands system.
Noteworthy changes and additions
- Made it much simpler to supply a custom cache processor. One alternative is already included, that splits the cache by guild. This should be faster as events for different guilds can be processed in parallel, but might be surprising for some, so it will stay opt in for now.
- CacheSnapshotBuilder is now immutable, and shares it's map with the snapshots created from it. This should mean much better performance and memory usage as long as you don't have a custom
CacheEvent
that does tons of updates. Cache
has been renamed toEvents
and now holds more than just the cache. It now also gives access to listen directly to the messages received from the gateway beforeAckCord
does more processing on them. This might help for you ifAckCord
can't construct anAPIMessage
due to missing values in the cache.- Types and contents of many
APIMessage
s has changed due to correctness and to reduce the chance of a message not being created due to missing values in the cache. - Set defaultMustMention to false, and add a new option to bypass symbol prefix if a mention was supplied
- Redo PrefixParser to have a structured form, and expose it's power more to you, the user. Included here is making it much easier to use dynamic configurable prefixes
- Add a help command system to the new command system
- Remove old commands module, no longer needed
- Add a nicer wrapper around Future[Option[A]] than OptionT. This should remove the need for all those cats imports
Additions
- Added a few more combinators to the message parser
- Add capability to inject data gotten from requests into the cache. This is a new
CacheEvent
that can be enabled for all requests started by aRequests
object by setting thealsoProcessRequests
field toRequestCacheUpdate.requestsProcessor
- Better docs and behavior for stuff in
Requests
- Allow configuring the buffer size for the cache
- Expose lots of lower level settings in
ClientSettings
- Add an event batching system. Skips individual updates to the cache for marginal performance benefits. Opt in
- Give easier access to the actor system from high level code
- Make it possible to log out, and then in again in the high level API
- Make failure in flowSuccess configurable. If
ignoreFailures
is true, the old behavior is kept. The failed request is logged and ignored
IfignoreFailures
is false, the error is thrown. For methods that run a single request, the error is not ignored - Add a command type that also has a description
Changes
- Check edit timestamp for cache eviction on messages
- More async and parallelism in action builders
- Add stacktrace when cache updater isn't found
- Log if no event was created from an APIMessage cache update
- Add some more stuff to the cache
- Make removal of messages from the cache more configurable
- Redo some of the code around reconnecting and restarting the gateway. Should now be more correct, and do less restarts
- Increase retry limit
- Add support for zlib-stream
- Log when the WS stream is shut down at a debug level
- Log sent and received stuff to their own logger
- Log some other stuff to their own logger
- Better logging in RateLimiter
- Add spurious wakeup to Ratelimiter
- Use classes for action builders
Fixes
- Renamed
GuildMessage
toGuildGatewayMessage
as this type of message is only received from the gateway - Voice channel getter now has the correct more specialized type
- Guild unavailable is always optional. Fixes #23
- Stop and log a warning if shard is stopped before it's started
- Guard against handling errors twice in the gateway handler
- Watch the right gateway handler Fixes #26
- Fix CDN route. Closes #21
- stop LavaplayerHandler actor when associated player is destroyed (#27) (Thanks to Jonathan Ostrander)
- Don't log an debug error for known but ignored cache types
- [FIX] ensure that absolute rate limit reset time is in the future (#29) (Thanks to Jonathan Ostrander)
- Cache GuildMembers received in VoiceStates
0.16.0
Alright, finally got 0.16.0 released. This is a big release that fixes many long standing issues in AckCord. My hope is that if nothing else shows up, 1.0.0 is finally in sight. Sorry in advance for probably breaking a lot of code with this release.
Big additions/changes:
- Rename commands to commands-old, and switch which one the high level API uses
- Deprecate RequestRunner, rename RequestHelper to Requests and create RequestsHelper to replace RequestRunner
- Add something similar to the commands DSL for event to the high level api
- Remove HasCache and flatten out the effect types a bit in the high level api
- Fixes and bring back partial functions for high level API
- Add support for intents
- Implement cache invalidation
- Make unknown value for enums
- Remove T/V channel naming convention
- Change to using opaque types instead of tagged types
- Snowflake ids are now covariant
- Channels now have specialized ids for each type
Additions
- Add bulk run method to CommandConnector
- Add a way to set the default value of mustMetion
- Better logging
- Use new IP Discovery for voice
- Misc new API additions
- Allow sending file messages from arbitrary sources
- Collect register info in it's own types, and improve naming convention around the place
Fixes
- Handle quoted command arguments
- Fix voice error handling
- Permission checks are now optimistic instead of pessimistic
- Fix ratelimiter
- Fix retry requests
0.15.0
Alright, another big update. Last release was almost half a year ago at this point, and a lot has happened since.
Major changes
- No more 2.11, update to something newer
- Effect types are gone from CacheSnapshot, and a lot of other places. It's now assumed to be Id in all places.
- Now uses Akka 2.6, together with typed actors
- Ratelimits and requests in general got a nice update. Failed requests are now printed as stack traces when they happen for better code, and easier debugging.
- The cache is now partially dynamic. Don't care about all those presence update events? Ignore them. Don't want to store Presence objects? Ignore them. (Still experimental)
- Requests now use FlowWithContext to store the context. That means no more context objects on the requests themselves.
- Voice v4
Minor updates
- New Discord APIs like prefferedLocale, guild features, selfStream
- Minor misc improvements to voice sending
- Better guild routers
- Add case sensitivity option to commands parsing
- Add success methods for single and many
- Add a method to shutdown the JVM after logout
Fixes
- Now handles a few more discord types like LFG, custom status presences, PRESENCES_REPLACE and others
- Fix voice sending
- Better shutdown
- Use patch for ModifyChannel
- Handle Websocket some errors better
- Update vChannelId in LavaplayerHandler when moved
- Fix webhook author obj
- Properly encode emoji parameters
- Always terminate actor system even if logout fails
0.14.0
Much smaller update this time
Additions:
- Improve methods for getting permissions and roles for a guild member. The old methods are deprecated, and will be removed in the future.
- Lot's of new commands improvements
- Add back PresenceWatching
- Switch to enumeratum for enums
- Improve error reporting when json values can't be decoded
- Misc API additions
Add boosting information
Fixes:
- Fix get category on guild channel not working
- Fixed some duplicate methods in syntax
- Fix url encoding of query params
- Send logout signal when stopping shard
0.13.0
Well now, this is one massive release containing both a lot of refactorings and simplifications, and lots of new API additions.
Features:
- Get the object something references, when the object itself only contains the ID in more places
- Lots of minor Discord API additions
- Add shard info in ready
- Added a map of all the different modules of AckCord to the README
- Added new channel types
Changes:
- Merged ackCordWebsocket into the two modules that used it
- ackCordREST, ackCordImages and ackCordOAuth merged into ackCordRequests
- Removed the ackcord prefix for the projects (nothing changes for you guys unless you want to contribute)
- Moved the root package (net.katstuff.ackcord -> ackcord)
- Merged network module into requests and websockets modules
- Removed util module
- Created READMEs for various modules
- Added Id type to the ackcord package
- Cleaned up and improved OAuth
- Removed deprecated stuff
- Redid voice to be more streaming. No more bursting senders
- Redid MessageParser and moved it to commands
- Redid request urls. Should fix all cases where query parameters were supposed to be used, but weren't
- Updated lots of versions
- Minor stuff I can't remember
Remappings:
- net.katstuff.ackcord.websocket.gateway -> ackcord.gateway
- net.katstuff.ackcord.websocket.voice -> ackcord.voice
- net.katstuff.ackcord.http.rest -> ackcord.requests
- net.katstuff.ackcord.http.requests -> ackcord.requests
- net.katstuff.ackcord.http.Routes -> ackcord.requests.Routes
- net.katstuff.ackcord -> ackcord
- More I've forgotten about
Fixes:
- Pass a real message to RateLimitException
- More minor fixes
0.12.0
A bit smaller release this time. This release should be source compatible with 0.11 as long as you didn't use any deprecated stuff. It is NOT binary compatible however. Anyway, let's get on to the changelog.
Changelog
- Now cross built for Scala 2.11
- RequestHelper now provides tools to execute requests in an ordered manner
- The retry methods in RequestHelper have been deprecated in favor of passing implicit settings that specify which behavior should be used. The current options are retry and ordered.
- Removed deprecated stuff
- Fixed sometimes(very rarely) sending events with a null cache state
0.11.0
Oh boy. This is a big one. My hope is that the central API shouldn't change too much after this version. So, on to the changes.
First the small changes and additions
- Global syntax methods have been moved to the
AckCord
singleton object RestOption
is now used in websockets, and is as such renamed toJsonOption
- Added convenience methods to convert an
Option
to aJsonOption
- Exported
JsonOption
to theackcord
package - Added method for getting connected members to a
VGuildChannel
given a guild - Added some basic supervision for the most important streams. Yay for error reporting.
- Moved global ratelimits to the ratelimiter actor. This means that you can no longer get a flow that only obeys route ratelimits.
- Message types are now case objects
- Improved type interference
- Use circe-derivation for most json typeclass derivation. Should reduce build times for AckCord.
- Made permission checks a thing that can be done on all requests
- Clarified
CreateEmoji
emoji param, and made a utility method for unicode emojis - Better names for
ClientSettings
build method - The maps in
CacheSnapshot
can now be empty depending on the implementation. They are not empty in Core. - Add a generic command error class
- Allow specifying if none, one or all command filters should report their error
- Add Discord API stuff from the last half year
- Add a restart shard message to
DiscordShard
- Create high level API materializers with error logging
- Added methods to
RequestHelper
to run many requests at once without using streams. These complipents thesingle<X>
methods. Retry methods have been renamed to accommodate this. - More stuff I probably forgot about
Next the big stuff
- RequestDSL is dead, long live RequestRunner
- Make auto derivation for MessageParser opt in
- Better commands
Lastly, the fixes
- Fix AuditLog not using raw roles
- Doc fixes
- Audio fixes
- Misc model fixes
- Fix no response requests
- Add better error reporting for future no response requests
- Fix wrong field name for edit message embed (thanks Flixs)
- Add new reactions on reaction event
- Fix gateway resume and retry
- Fix lavaplayer module POM. You no longer need to add JCenter to your resolvers
- Other fixes I can't remember
The big changes more in depth
Let's go over the big changes that very likely will impact your code. This release marks the first (I think), where stuff isn't changing so much that I can't retain the original methods, so for the most part, many things talked about here still, exists, but in a deprecated form.
RequestDSL has been deprecated
RequestDSL has been deprecated, and will likely be removed next minor release. In it's place there is RequestRunner
. For the most part they should work similarly. Everything that took a RequestDSL
now has a RequestRunner
alternative instead. RequestRunner
can also use Future[List[A]]
behind the scenes, but you're adviced to stick to streams.
MessageParser auto derivation is opt in
Simple change to explain. MessageParser
will no longer automatically derive instances for you. If you want this behavior, import MessageParser.auto._
Better commands
Commands have gotten more improvements, although not as much of a redesign as last time. The goal this time is to hand more control of how commands are parsed over to you guys.
CmdRefiner
Individual commands are now parsed by CmdRefiner
. If you want back the old behavior of name + category + filters, then use CmdInfo
, which is an implementation of CmdRefiner
. Categories have also been changes. Simply put, they don't exist anymore. Instead we just use normal strings.
AbstractCommandSettings
You also now have control over the general shape commands have using AbstractCommandSettings
. If you want the old logic back, you can continue to use CommandSettings
as a default implementation.