Interactions-molter

Latest version: v1.1.0

Safety actively analyzes 623412 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

4.2.0

Breaking Changes
* CHORE💥: Upgrade to `interactions.py` 4.2.0. Obvious, but worth mentioning.
* FEAT💥: Removed support for 0 argument functions
* FEAT💥: Molter injections now live in a `molter` attribute in the injected `Client`. You can use `MolterInjectedClient` to typehint it if you wish.
* REFACTOR💥: All instances of "message command" have been replaced by "prefixed command." Discord calls them "text commands," but I disagree with the naming.
* REFACTOR💥: `Converter` has been renamed to `MolterConverter` to avoid confusion with `interactions.py`'s converters.
* REFACTOR💥: Removed some internal classes from the main namespace import.
* REFACTOR💥: `MolterCommand.params` > `MolterCommands.parameters`.
* REFACTOR💥: `MolterCommand.command_dict` > `MolterCommand.subcommands`.
* REFACTOR💥: Commands are now hashable. `MolterCommand.all_commands` is now a frozen set.
* REFACTOR💥: Any instance of "bot" has been replaced with "client," though `MolterContext.bot` still exists as an alias.

Other Changes
* FEAT: Add `register_converter` and `globally_register_converter`. These allow you to "register" converters for a specified type. This is explained more in detail in the examples.
* FEAT: Allow (and encourage) using `molter.setup`.
* FEAT: Add file sending support for `MolterContext.send/reply`.
* FEAT: Convert `Literal` arguments for the command instead of just internally.
* FEAT: Added `MolterCommand.is_subcommand()`.
* FEAT: `Greedy` now checks for more invalid cases.
* FEAT: Added error handling for 2+ kwarg/variable arguments.
* REFACTOR: Adjust quotes handling to match up better with `discord.py`.
* FIX: Using `interactions.Client` for `MolterExtension` no longer complains.
* FIX: Variable arguments now get passed correctly.
* FIX: A *lot* that are too minor to list here.

**Full Changelog**: https://github.com/interactions-py/molter/compare/v0.3.1...v0.4.0

1.0.1

Just some changes I had on the `dev` branch that I decided to finally release. Nothing major.

Changes
- FEAT: Add a sanity check for custom prefix + no guild message content intent.
- CHORE: Remove need for `setup.cfg`.
- DOCS: Typo fixes.
- CI: Upgrade setuptools so it recognizes `pyproject.toml`.

**Full Changelog**: https://github.com/interactions-py/molter/compare/v1.0.0...v1.0.1

1.0.0

Yep, the big 1. We're *finally* here, after so many months of development.

Major Feature
That's right, I made a whole section just to announce that `interactions-molter` finally has docs!

These docs are pretty much what you expect out of any library having them - it features tutorials, examples, FAQs, and an API Reference. Pretty much every part of Molter is viewable.

You can read the docs for the latest PyPI release here: https://interactions-py.github.io/molter/main/
Other branches' docs can be found here: https://interactions-py.github.io/molter/

Breaking Changes:
- FEAT💥: Remove `MolterManager.prefixed_command`, which was deprecated in the last release.
- FEAT💥: Make `MolterManager.remove_prefixed_command` able to remove subcommands, and also make it return the deleted command.
- FEAT💥: Use a custom `MISSING` instead of `interactions.py`'s... lacking one. Even if the one there improves, I'm not changing `MISSING`.
- REFACTOR💥: `MolterCommand.all_commands` was renamed to `all_subcommands`.
- REFACTOR💥: Put the utils in a separate namespace. This means you have to do `molter.utils.x` instead of `molter.x` for them.
- DOCS💥: Rearrange and rename examples.
- META💥: Rename `stable` to `beta`, which makes the name far more accurate to its actual usage.

Other Changes:
- FEAT: Add in `MolterManager.get_prefixed_command`, which gets a command by its name (even its fully qualified name).
- FEAT: Add in `docs` extra to the package. It helps when you're, well, building docs.
- FEAT: Add `attachment` to `MolterContext.send/reply`.
- CHORE: Use more modern package config standards.
- DOCS; Like, a *lot* of typo fixes and rewordings.
- DOCS: Molter is now consistently styled as Molter, not `molter`.
- DOCS: Clean up the examples in general.
- DOCS: The `README` has been changed too.

**Full Changelog**: https://github.com/interactions-py/molter/compare/v0.6.2...v1.0.0

0.6.2

The "holy crap, how did I *not* catch these earlier?" fixes.

Updates
- FIX: Detect more cases of `NoArgumentConverter` when parsing commands.
- FIX: Make `ignore_extra` function correctly when used with a command that has no parameters.
- FIX: Allow parameters typehinted with a coroutine to properly work, just like normal functions.

**Full Changelog**: https://github.com/interactions-py/molter/compare/v0.6.1...v0.6.2

0.6.1

Quick bug fix--

Updates
- FIX: Parse subcommand parameters.

**Full Changelog**: https://github.com/interactions-py/molter/compare/v0.6.0...v0.6.1

0.6.0

A friendly reminder that `molter` is in beta for a reason 😅.

Breaking Changes
- FEAT💥: Remove hybrid command support for now. The new `interactions.py` version makes the old system not really work.
- FEAT💥: Move `on_molter_command` to trigger right *before* execution of the command itself, rather than happening afterwards.
- FEAT💥: Remove the `fetch_data_for_context` from `molter.setup` (and the class it generates). It's unneeded now.
- FEAT💥: Make most of the setup arguments keyword only.
- FEAT💥: `MolterContext.channel` and `MolterContext.guild` will always be there without needing to use `get_x` (in fact, those functions have been removed), suggesting they exist. `MolterContext.guild` can still be `None` in DMs.
- FEAT💥: The permission helpers in `MolterContext` have been totally changed, being a simple property instead of a co-routine now. It is worth noting that `compute_guild_permissions` has no alternative now; use `molter.guild_permissions` for that if you need it.
- FEAT💥: Parameters for prefixed commands are parsed at bot startup (for those in the main file) or when the extension that has them is loaded, instead of being parsed as the `PrefixedCommand` object is created. This is a very technical change - I don't expect people to face issues over this, and this will likely bring a small performance upgrade. You'll need to use `PrefixedCommand._parse_parameters` if you add in a command after either of those two, though.
- FEAT🔥: Deprecate `MolterManager.prefixed_command` - you can use `molter.prefixed_command` in your main file now.
- FIX💥: Remove the alias from a prefixed command if you specify to remove an alias to any of the "remove prefixed command" helpers.
- CHORE💥: Bump the `interactions.py` version to `4.3.0`.
- REFACTOR💥: Rename `Molter` (the object) to `MolterManager` to make things less confusing.
- REFACTOR💥: `MolterManager.prefixed_command` no longer adds the prefixed command to the internal storage of prefixed commands - it simply just creates the class. As prefixed commands in the main files are automatically read and stored as the bot is booting up now, this shouldn't cause any problems unless you were making commands *after* startup.

Major Changes
- FEAT: Molter is now much, *much* faster as it uses the cache introduced in `4.3.0` to full effect. You *will* notice a difference, especially if you used one of Molter's converters. The UX has also been massively improved because of this.
- FEAT: `molter.prefixed_parameter` exists now, which for now allows you to adjust the defaults for parameters to use, say, a function.
- FEAT: Add `ext_error_handler` for `Extension`-wide erorrs, and `PrefixedCommand.error` for specifically scoped errors. There a whole file in the advanced examples folder explaining them.
- FEAT: Add in `MolterContext.me` and `fetch_me` for fetching the current bot user.
- FEAT: Add `MolterExtensionMixin`, which will allow you to use Molter alongside other extensions that have their own `Extension` subclass to use for your own `Extension`. Extension is a word, I promise.
- FEAT: You can use `molter.prefixed_command` in main files now, and it's actually preferred that you do so.
- FEAT: Add `molter.text_command` if you love Discord's naming scheme that much.
- FEAT: Add `on_molter_command_complete` for the old `on_molter_command` behavior.
- FEAT: Add `MolterManager.remove_prefixed_command`.

Other Changes
- REFACTOR: Use `typing_extensions.Self` rather than a forward reference to the class.
- REFACTOR: Typehints have been polished up.
- FIX: Try getting the guild ID from the channel if it isn't there for the message. This is so unlikely though that this change borders on unnecessary.
- FIX: There's also like 50 more of them, which include checking for an overwrite's existence for the permission helpers.
- CHORE: Remove the now unneeded `attrs` requirements, as `interactions.py` does that.
- DOCS: Like, a *lot* of polishing and rearranging. Did you know that I completely forgot to do an example for `typing.Union`? I have no idea how I even did that.



**Full Changelog**: https://github.com/interactions-py/molter/compare/v0.5.0...v0.6.0

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.