We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Option([XX, YY]) doesn't work
launch minimal code, it raises exception directly
import discord from discord.commands import slash_command, Option bot = discord.Bot() from discord.commands import slash_command @slash_command() async def test(ctx, channel: Option([discord.TextChannel, discord.VoiceChannel])): ctx.respond("Hello") bot.run("XXX")
bot launch normally
bot raised a exception, and program exit with error.
Traceback (most recent call last): File "/Users/XXX/Desktop/test.py", line 14, in <module> ctx.respond("Hello") File "/Users/XXX/Desktop/venv/lib/python3.10/site-packages/discord/commands/options.py", line 132, in __init__ _type = SlashCommandOptionType.from_datatype(input_type) File "/Users/XXX/Desktop/venv/lib/python3.10/site-packages/discord/enums.py", line 653, in from_datatype if datatype.__name__ in ["Member", "User"]: AttributeError: 'list' object has no attribute '__name__'. Did you mean: '__ne__'?
None
No response
The text was updated successfully, but these errors were encountered:
Duplicate of #991.
Sorry, something went wrong.
No branches or pull requests
Summary
Option([XX, YY]) doesn't work
Reproduction Steps
launch minimal code, it raises exception directly
Minimal Reproducible Code
Expected Results
bot launch normally
Actual Results
bot raised a exception, and program exit with error.
Intents
None
System Information
Checklist
Additional Context
No response
The text was updated successfully, but these errors were encountered: