Skip to content

v2.1.0a1

Choose a tag to compare

@FasterSpeeding FasterSpeeding released this 02 Oct 15:38
· 856 commits to master since this release
3f74722

2.1.0a1 - 2021-10-02

Added

  • Adding an option to SlashCommand will now raise if the name is invalid (doesn't match the names regex).
  • Validation to slash command classes.
  • Special case type injector handling for the client itself.

Changed

  • Breaking: Client.set_type_dependency now takes a literal value rather than a callback.
  • Client.declare_slash_commands and Client.set_global_commands now check if the target resource's commands match the commands to be declared before actually declaring them unless force is set to True. This helps avoid issues with ratelimiting.
  • Client level special cased type injectors are now handled as normal type injectors which are just implicitly set from the start.
  • Client.load_modules now respects __all__ if present.

Fixed

  • Small change to help MyPy better understand protocol behaviour.
  • SlashContext.mark_not_found and cancel_defer are actually called if the command was not found in the REST flow.

Removed

  • Client.add_type_dependency and Client.add_callback_override
  • Special case type dependency methods have been removed/hidden.
  • pass_as_kwarg option from slash command artificial member options as the always member constraint cannot be present without pass_as_kwarg behaviour.

[2.0.1a1.post1] - 2021-09-26

Fixed

  • Trailing : on a type: ignore comment which broke MyPy compatibility.