> 2 commands has been synced succsesfully
Command tree synced expirementaly
2024-11-22 22:22:52 ERROR discord.app_commands.tree Ignoring exception in command 'synx'
Traceback (most recent call last):
File "C:\Users\lazorzneq\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\app_commands\commands.py", line 858, in _do_call
return await self._callback(interaction, **params) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\lazorzneq\Documents\Project.Discord\Swift Blink\Welcome.py", line 38, in sync
await interaction.response.send_message(f'Command tree synced expirementaly, {interaction.user.mention}', ephemeral=True)
File "C:\Users\lazorzneq\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\interactions.py", line 855, in send_message
await adapter.create_interaction_response(
File "C:\Users\lazorzneq\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\webhook\async_.py", line 221, in request
raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10062): Unknown interaction
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\lazorzneq\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\app_commands\tree.py", line 1310, in _call
await command._invoke_with_namespace(interaction, namespace)
File "C:\Users\lazorzneq\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\app_commands\commands.py", line 883, in _invoke_with_namespace
return await self._do_call(interaction, transformed_values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lazorzneq\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\app_commands\commands.py", line 876, in _do_call
raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'synx' raised an exception: NotFound: 404 Not Found (error code: 10062): Unknown interaction
Мне нужна команда дерева, которая синхронизировала бы мои команды. Кроме того, было бы неплохо, если бы я мог преобразовать в гибридную команду
[code]import discord from discord import app_commands from discord.ext import commands bot = commands.Bot(command_prefix="!", intents = discord.Intents.all()) e = 'smth went wrong while syncing' @bot.event async def on_ready(): try: # syncing the command synced = await bot.tree.sync() print(f'{len(synced)} commands has been synced succsesfully') except Exception as e: print (e)
@bot.tree.command(name='hmmm') async def hello (interaction: discord.Interaction): await interaction.response.send_message(f'Slash commands are ready, {interaction.user.mention}', ephemeral=True) # makes command visible only to you
[/code] все работало нормально, потом я кое-что изменил, и оно перестало работать, и я не могу понять, в чем дело. Вывод на консоль: [code]> 2 commands has been synced succsesfully Command tree synced expirementaly 2024-11-22 22:22:52 ERROR discord.app_commands.tree Ignoring exception in command 'synx' Traceback (most recent call last): File "C:\Users\lazorzneq\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\app_commands\commands.py", line 858, in _do_call return await self._callback(interaction, **params) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\lazorzneq\Documents\Project.Discord\Swift Blink\Welcome.py", line 38, in sync await interaction.response.send_message(f'Command tree synced expirementaly, {interaction.user.mention}', ephemeral=True) File "C:\Users\lazorzneq\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\interactions.py", line 855, in send_message await adapter.create_interaction_response( File "C:\Users\lazorzneq\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\webhook\async_.py", line 221, in request raise NotFound(response, data) discord.errors.NotFound: 404 Not Found (error code: 10062): Unknown interaction
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\lazorzneq\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\app_commands\tree.py", line 1310, in _call await command._invoke_with_namespace(interaction, namespace) File "C:\Users\lazorzneq\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\app_commands\commands.py", line 883, in _invoke_with_namespace return await self._do_call(interaction, transformed_values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\lazorzneq\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\app_commands\commands.py", line 876, in _do_call raise CommandInvokeError(self, e) from e discord.app_commands.errors.CommandInvokeError: Command 'synx' raised an exception: NotFound: 404 Not Found (error code: 10062): Unknown interaction [/code] Мне нужна команда дерева, которая синхронизировала бы мои команды. Кроме того, было бы неплохо, если бы я мог преобразовать в гибридную команду
Я получаю сообщение об ошибке 404 «Неизвестное взаимодействие» при выполнении следующей команды:
@vot.event
@bot.tree.command(name='synx', description='expiremental sync')
@app_commands.checks.has_any_role(1024396774955298909, 1249016717032820770,...
Предположим, в турнире участвуют 3 команды A, B и C. Возможны 3 совпадения AB, BC, CA. Это тривиальный пример. Число команд не может быть 10. Нам нужно распечатать все комбинации команд.
В настоящее время использую Discord 2.4.0 и Python 3.12.1
На моем портале разработки -> Rich Presence -> Rich Presence Assets я загрузил изображение jpg размером 1024x1024 и назвал его «asset_id». . Я обязательно сохранил изменения, и после...
Мне нужно реализовать разную логику в зависимости от того, какая схема аутентификации использовалась для аутентификации пользователей. В настоящее время я использую функцию IAuthenticateResultFeature в HttpContext, но мне очень сложно ее модульное...