Version 2 Changelog#
Below are all the changelogs for the stable versions of hikari-lightbulb (version 2.0.0 to present).
bucketattribute has been added to the
Fix button navigator due to hikari breaking changes.
Autocomplete callbacks may no longer return instances of
hikari.CommandChoiceas it has been deprecated. Use
Potentially Breaking Changes
lightbulb.utils.parserhas been moved up a level to
OptionsProxywill now raise an
AttributeErrorwhen trying to access an option that does not exist.
Slash commands now have full custom converter support.
Permission checks improved to use interaction permission fields where appropriate.
nsfwnot applying correctly for global commands.
max_lengthfor command options.
Fix deferral of slash subcommands not working as intended.
Potentially Breaking Changes
lightbulb.cooldown_algorithms.CooldownStatushas been moved from the
bucketsmodule to the
commands_runattribute has been removed from the
lightbulb.decorators.commanddecorator in order to mark a command as only usable in NSFW channels.
lightbulb.checks.nsfw_channel_only. Use the above new feature instead. The check will be removed in version
lightbulb.context.base.Context.respond_with_modal. Note that this will not work if called on an instance of
lightbulb.converters.special.MessageConverterto support conversion of
Implement multiple built-in cooldown algorithms which can be specified when adding a cooldown to a command.
lightbulb.utils.Parserapi has been completely changed. If you use this class directly in your own codebase then you will need to change your code.
Add support for hikari
Checks should now work in threads.
Implement application command localization.
Add support for Python 3.11.
Bump hikari requirement to
Allow a user to iterate through
DataStoreto be more type-complete.
Implement application command permissions V2. See
Add ability to edit ephemeral followup responses to application commands.
wait_before_executionfor tasks to allow delaying the first task execution.
ResponseProxyis now awaitable to allow you to directly await the response to retreive the message.
Permission util methods (and by proxy checks) now account for guild owner having all permissions.
Improve typing and add missing method overloads.
CONSUME_RESTto strip leading whitespace before consuming the remaining string.
Fix subcommand attribute propagation problems when setting initialiser attributes.
Fix context menu commands not able to be registered globally.
StartingEventlistener not correctly being subscribed to in the tasks extension.
__all__to add missing items.
Fix non-ephemeral followup responses to interactions not being able to be edited.
Add support for
Fix plugins being shown in the default help command even when no commands are visible in the plugin.
Fix subcommand names being present in
Context.optionsfor slash subcommands.
Fix option serialiser not correctly detecting changes for value for
KeyErrorbeing raised instead of a more appropriate error when attempting to reload an extension that is not already loaded.
lightbulb.ext.tasksextension for repeating tasks.
auto_defernot working as expected for subcommands.
Fix subcommands not being registered to more than one command group at a time where it would be expected.
Add context menu (user and message) commands.
BotApp.remove_pluginnot correctly removing plugins from the bot’s plugin list.
Modify the stop emoji for
Add additional validation for slash command options.
Rewrite application command management system to reduce the total number of requests made.
Fix plugins showing in the default help command when there are no commands shown for that plugin.
Add support for sending of attachment(s) within interaction initial responses.
Add typing overloads to
Fix plugin checks not propagating correctly for subcommands.
Add additional validation to ensure correct decorator order.
Fix editing ephemeral responses raising a
Fix various type hints.
lightbulb.errors.ExtensionNotFounderror being raised when an import fails in an extension being loaded.
default_enabled_guildsargument to the
Fix error raised when exclusive checks are added to any object.
lightbulb.errors.CheckFailureare no longer wrapped in an additional
lightbulb.errors.CheckFailureobject when a check fails.
lightbulb.decorators.optionto allow you to use your own
Implement ability to use namespace packages to extend lightbulb. See Extension Libraries.
Fix application command instances being populated only if the command was created.
Fix application commands only being created for the first given guild ID.
Fix various typing preventing code written using lightbulb from being mypy compliant.
__all__to all init files in order to be able to export more items to top level.
lightbulb.app.BotApp.load_extensions_fromnot working on windows computers.
lightbulb.checks.has_attachmentsnot being exported.
Allow absolute paths to be passed to
.bot) to no longer be optional. A
RuntimeErrorwill always be raised if the attributes would’ve returned None.
Fix various type hints for the
Fix options with a default value of
0actually defaulting to
Fix slash command groups erroring on creation if using the
Add exclusive checks feature. Only one of the exclusive checks will be required to pass in order for the command to be run. See the checks API reference page for more information.
This version is a complete rewrite of the API. Almost everything has been rewritten from scratch so don’t expect much, if any, of the API to be the same as in version 1.
Lightbulb is now fully typed and mypy compliant.
Slight memory usage improvements.
Added ability to do
python -m lightbulbto give basic version information.
- Complete rewrite of the method used to define commands. See Creating Commands for details on the new method.
Prefix and slash commands are now defined the same way, and single functions can implement any combination of commands.
Options (arguments) are now defined using the
lightbulb.decorators.optiondecorator instead of parsing the command signature.
Plugins are no longer defined as classes. See Plugins for details on the new method of defining and using plugins.
Contexts now all have the same interface.
lightbulb.context.base.Contextis the base class.
- Help command has been completely overhauled.
get_command_signaturefunction in favour of a
signatureproperty on command objects.
Application command management and change detection has been completely overhauled.
Some errors have been removed, new errors have been added.
Custom converters have been overhauled to use a base class instead of being functions
Added ability to automatically defer responses to commands, as well as the ability to send all responses from a command as ephemeral by default.
Rewrite permission checks.
Added many more event types for the additional types of commands available.
Minor changes to cooldown implementation.
Added data store module to assist with storing data in the bot (and optionally plugin) instance(s).
Refactor argument parsing for prefix commands to allow you to drop in your own implementation.
Minor changes to navigator and paginator implementation - you shouldn’t notice these in normal use.
Command and context classes moved up a level to their respective sub-modules. You can no longer access them with
lightbulb.xyou need to instead do
Prefix command groups, subgroups and subcommands now require separate classes.
Added guides section in the documentation.
Changed documentation theme.