@Bot.slash_command()
async def op(ctx, msg):
n = json.dumps(msg)
o = json.loads(n)
await ctx.send(embed=disnake.Embed.from_dict(o))
Ignoring exception in slash command 'op':
Traceback (most recent call last):
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python38\lib\site-packages\disnake\ext\commands\slash_core.py", line 730, in invoke
await call_param_func(self.callback, inter, self.cog, **kwargs)
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python38\lib\site-packages\disnake\ext\commands\params.py", line 1022, in call_param_func
return await maybe_coroutine(safe_call, function, **kwargs)
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python38\lib\site-packages\disnake\utils.py", line 599, in maybe_coroutine
return await value
File "c:\Users\ak28r\OneDrive\Рабочий стол\Vab-py\cmd.py", line 290, in op
await ctx.send(embed=disnake.Embed.from_dict(o))
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python38\lib\site-packages\disnake\embeds.py", line 255, in from_dict
self.title = str(title) if (title := data.get("title")) is not None else None
AttributeError: 'str' object has no attribute 'get'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python38\lib\site-packages\disnake\ext\commands\interaction_bot_base.py", line 1353, in process_application_commands
await app_command.invoke(interaction)
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python38\lib\site-packages\disnake\ext\commands\slash_core.py", line 739, in invoke
raise CommandInvokeError(exc) from exc
disnake.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'str' object has no attribute 'get'
Ignoring exception in slash command 'op':
Traceback (most recent call last):
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python38\lib\site-packages\disnake\ext\commands\slash_core.py", line 730, in invoke
await call_param_func(self.callback, inter, self.cog, **kwargs)
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python38\lib\site-packages\disnake\ext\commands\params.py", line 1022, in call_param_func
return await maybe_coroutine(safe_call, function, **kwargs)
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python38\lib\site-packages\disnake\utils.py", line 599, in maybe_coroutine
return await value
File "c:\Users\ak28r\OneDrive\Рабочий стол\Vab-py\cmd.py", line 290, in op
await ctx.send(embed=disnake.Embed.from_dict(o))
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python38\lib\site-packages\disnake\embeds.py", line 255, in from_dict
self.title = str(title) if (title := data.get("title")) is not None else None
AttributeError: 'str' object has no attribute 'get'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python38\lib\site-packages\disnake\ext\commands\interaction_bot_base.py", line 1353, in process_application_commands
await app_command.invoke(interaction)
File "C:\Users\ak28r\AppData\Local\Programs\Python\Python38\lib\site-packages\disnake\ext\commands\slash_core.py", line 739, in invoke
raise CommandInvokeError(exc) from exc
disnake.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'str' object has no attribute 'get'
{
"allwords": 3,
"1": "hpp",
"2": "hlp",
"3": "help pls"
}
help pls
{'allwords': 3, '1': 'hpp', '2': 'hlp', '3': 'help pls'}
not work