Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Don't throw confusing error when using unsuppressed autocomplete in Hybrid Commands #1668

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion interactions/ext/hybrid_commands/hybrid_slash.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from interactions.client.utils.serializer import no_export_meta
from interactions.client.utils.misc_utils import maybe_coroutine, get_object_name
from interactions.client.errors import BadArgument
from interactions.client import get_logger
from interactions.ext.prefixed_commands import PrefixedCommand, PrefixedContext
from interactions.models.internal.converters import _LiteralConverter, CONSUME_REST_MARKER
from interactions.models.internal.checks import guild_only
Expand Down Expand Up @@ -355,7 +356,7 @@ def slash_to_prefixed(cmd: HybridSlashCommand) -> _HybridToPrefixedCommand: # n

if option.autocomplete and not cmd._silence_autocomplete_errors:
# there isn't much we can do here
raise ValueError("Autocomplete is unsupported in hybrid commands.")
get_logger().warning("Autocomplete is unsupported in hybrid commands.")

name = option.argument_name or str(option.name)
annotation = inspect.Parameter.empty
Expand Down
Loading