Releases: hypergonial/hikari-arc
Releases · hypergonial/hikari-arc
v2.1.1
v2.1.0 - Polls
- Add
poll
toContext.respond
. - Adjust
Context.app_permissions
typing to match hikari, removingNone
from the union type. - Bump hikari to
v2.2.1
.
v2.0.0 - User Installs
- Breaking: Remove
is_dm_enabled
from all command, plugin, and client types. Use the newly addedinvocation_contexts
instead. - Breaking: Remove deprecated
Client.set_startup_hook
andClient.set_shutdown_hook
. Use the newly addedClient.add_startup_hook
andClient.add_shutdown_hook
instead. - Breaking: Remove
Context.get_channel
andAutocompleteData.get_channel
. Use the newly addedContext.channel
andAutocompleteData.channel
properties instead. - Add support for user installations of commands.
- Add
invocation_contexts
andintegration_types
to all command, plugin, and client types. - Add
invocation_context
andauthorizing_integration_owners
toContext
andAutocompleteData
.
- Add
- Add
Client.find_command
andPluginBase.find_command
to get a command by name. - Bump
hikari
tov2.2.0
.
Migration guide
is_dm_enabled
removal
# Before 2.0
client = arc.GatewayClient(..., is_dm_enabled=False)
# After 2.0
# Omit hikari.ApplicationContextType.BOT_DM to disable DMs
# You may also want to remove PRIVATE_CHANNEL if you don't want to support group DMs
client = arc.GatewayClient(
...,
invocation_contexts=[
hikari.ApplicationContextType.GUILD,
hikari.ApplicationContextType.PRIVATE_CHANNEL
]
)
This applies similarly to command or plugin-level use of this setting.
set_startup_hook
and set_shutdown_hook
removal
# Before 2.0
@client.set_startup_hook
async def startup_hook(client: arc.GatewayClient) -> None:
print("Client started up!")
@client.set_shutdown_hook
async def shutdown_hook(client: arc.GatewayClient) -> None:
print("Client shut down!")
# After 2.0
@client.add_startup_hook
async def startup_hook(client: arc.GatewayClient) -> None:
print("Client started up!")
@client.add_shutdown_hook
async def shutdown_hook(client: arc.GatewayClient) -> None:
print("Client shut down!")
get_channel
removal
# Before 2.0
@arc.slash_command("test", "Test command")
async def test(ctx: arc.GatewayContext) -> None:
channel = ctx.get_channel()
# After 2.0
@arc.slash_command("test", "Test command")
async def test(ctx: arc.GatewayContext) -> None:
channel = ctx.channel
v1.4.0
- Bump
hikari
tov2.0.0
. - Add Python 3.13 support.
- Add new optiontype with converter for
hikari.Emoji
. - Work around
hikari
bug to solve command sync failing when a command has localizations.
v1.3.4
- Fix included basic hooks not working due to signature parsing
v1.3.3
- Fix hooks defined as async callable classes not working. (For instance, limiters)
v1.3.2
- Add
IntervalLoop.set_interval()
to change the loop interval after loop creation. - Fix error handling with slash subcommands sometimes causing infinite recursion.
v1.3.1
- Add the ability to configure if an
IntervalLoop
should run immediately after being started or not. - Fix
CronLoop
running immediately after being started.
v1.3.0
Deprecations
- Deprecate
Client.set_startup_hook
andClient.set_shutdown_hook
. These will be removed inv2.0.0
. Use the newly addedClient.add_startup_hook
andClient.add_shutdown_hook
instead.
Changes
- Add options with converters. These options do not exist on Discord's end, arc simply tries to convert a more primitive optiontype into the requested one, failing if it is not possible.
- Add new optiontypes with converters for
hikari.Member
andhikari.Color
. - Add
arc.OptionConverterFailureError
when a converter fails to convert an option value. - Add support for injecting dependencies contextually to command callbacks, hooks, and error handlers via
Client.add_injection_hook
andClient.remove_injection_hook
. - Add support for multiple startup & shutdown hooks via
Client.add_startup_hook
andClient.add_shutdown_hook
respectively. - Inject dependencies by default into pre/post-execution hooks & error handlers.
Fixes
- Fix client hooks being executed twice if a command is added to a plugin.
- Fix options mapping not taking name overrides into account.
Misc
- Bump alluka to
0.3+
.
v1.2.1
- Fix
arc.utils.global_concurrency
missing alimit
argument. - Fix slash subcommands failing to resolve autodefer settings.