This naming scheme was garbage and always tripped me up. In favor of
having a more intuitive (and less _technically_ correct) interface,
we'll swap the name up.
- Bot.get_commands_for_message is now more composable/externally useable
- Command parser for 'user' type has been improved to allow
username/discrim combos
- Model loading can now be done outside of the model constructor, and
supports some utility arguments
- Fix sub-model fields not having their default value be the sub-model
constructor
- Fix Message.without_mentions
- Add Message.with_proper_mentions (e.g. humanifying the message)
- Cleanup Message.replace_mentions for the above two changes
- Fix some weird casting inside MessageTable
- Add plugin context on load
- Allow providing additional kwargs to a command context
- Commands are now stored using their base trigger instead of function
name, which allows for multiple bindings on a single function
- Use argument passing for register_listener
- Fix RedisProvider.get_many failing when its passed an empty list of
keys
- Add some utility properties on MessageReactionAdd/Remove
- Support type conversion toggling in MessageTable
- Latest holster fixes
Tl;dr we now use __slots__ in a bunch of places. This could still be
better, and we do a bit too much magic in the modeling to make me happy.
But thats for later, for now we're going from ~250mb on 2500 guilds to
~160mb.
- Allow configuring the state module within the normal configuration
(under the 'state' key)
- Rate limit events being sent on the gateway socket
- Convert to using lazy_datetime in a bunch of places
- Allow configuring guild member sync
- Better logic around loading guilds, add State.ready condition which
can be waited on
- Fix inheritance in the modeling framework (how was this not working
before lol wut)
- Added __slots__ to a bunch of low-hanging fruit models
- Move member sync onto the guild object as Guild.sync()
- Convert to Dannys CachedSlotProperty (could still be better, will
improve later)
- Added util.snowflake.calculate_shard
My previous stab at implementing the simple-modeling-orm-thing-tm failed
in the aspect that there was a lot of duplicated code doing runtime
inspection of stuff. This was due mostly to having no extra place to
store information on types, making it hard to introspect how the type
expected to be built, whether it had a default, etc.
This commit refactors the modeling code to actually have a Field type,
which wraps some information up in a simple class and allows extremely
easy conversion without having to do (more) expensive runtime
inspection. This also gives us the benefits of a much more
readable/cleaner code, expandable field options, and not having to fuck
with sphinx to get docs working correctly (it was duping attributes
because they where aliases...)
- s/DiscoClient/Client (was redundant and looked ugly)
- move cached_property to functional utils
- abstract client configuration out to a ClientConfig
- command line utility is now completely isolated from the client
- add ETF (using erlpack) support, optionally enabled via command line
flags (and only works on 2.x because of erlpack)
- Refactor the way gateway events are built a bit
- Add documentation on utilities