You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ignoring exception in command test:
Traceback (most recent call last):
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\commands\core.py", line 127, in wrapped
ret = await coro(arg)
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\commands\core.py", line 877, in _invoke
await self.callback(self.cog, ctx, **kwargs)
File "D:\Proyectos\Discord\BotTesting\bot\cog.py", line 30, in test
await ctx.respond(view=view)
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\commands\context.py", line 258, in respond
return await self.interaction.response.send_message(*args, **kwargs) # self.response
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\interactions.py", line 680, in send_message
payload["components"] = view.to_components()
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\ui\view.py", line 216, in to_components
children = [item.to_component_dict() for item in group]
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\ui\view.py", line 216, in <listcomp>
children = [item.to_component_dict() for item in group]
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\ui\select.py", line 280, in to_component_dict
return self._underlying.to_dict()
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\components.py", line 348, in to_dict
"options": [op.to_dict() for op in self.options],
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\components.py", line 348, in <listcomp>
"options": [op.to_dict() for op in self.options],
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\components.py", line 456, in to_dict
payload["emoji"] = self.emoji.to_dict() # type: ignore
AttributeError: 'str' object has no attribute 'to_dict'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\bot.py", line 992, in invoke_application_command
await ctx.command.invoke(ctx)
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\commands\core.py", line 358, in invoke
await injected(ctx)
File "D:\Proyectos\Discord\BotTesting\venv\lib\site-packages\discord\commands\core.py", line 135, in wrapped
raise ApplicationCommandInvokeError(exc) from exc
discord.errors.ApplicationCommandInvokeError: Application Command raised an exception: AttributeError: 'str' object has no attribute 'to_dict
Intents
Default Intents
System Information
Python v3.9.10-final
py-cord v2.0.0-final
aiohttp v3.8.1
system info: Windows 10 10.0.19044
Checklist
I have searched the open issues for duplicates.
I have shown the entire traceback, if possible.
I have removed my token from display, if visible.
Additional Context
On initialization, the following code is executed:
ifemojiisnotNone:
ifisinstance(emoji, str):
emoji=PartialEmoji.from_str(emoji)
elifisinstance(emoji, _EmojiTag):
emoji=emoji._to_partial()
else:
raiseTypeError(f"expected emoji to be str, Emoji, or PartialEmoji not {emoji.__class__}")
Which is not executed when doing the_select_option.emoji = "🔴".
The text was updated successfully, but these errors were encountered:
Summary
Setting the emoji property of a SelectOption after initialization raises an exception when sending it
Reproduction Steps
"🔴"
after initializing the SelectOptionMinimal Reproducible Code
Expected Results
No exception.
Actual Results
An exception similar to this
Intents
Default Intents
System Information
Checklist
Additional Context
On initialization, the following code is executed:
Which is not executed when doing
the_select_option.emoji = "🔴"
.The text was updated successfully, but these errors were encountered: