Задать вопрос
  • Ошибка при запуске бота для discord на python, как решить?

    @White_Worker
    Сегодня столкнулся с похожей проблемой:
    Bot connection
    [2022-09-19 09:54:20] [INFO    ] discord.client: logging in using static token
    Traceback (most recent call last):
      File "C:\Users\litov\OneDrive\Рабочий стол\python_work\Новая папка\bot.py", line 90, in <module>
        client.run(settings ['TOKEN'])
      File "C:\Users\litov\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\client.py", line 828, in run
        asyncio.run(runner())
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\lib\asyncio\runners.py", line 44, in run
        return loop.run_until_complete(main)
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 646, in run_until_complete
        return future.result()
      File "C:\Users\litov\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\client.py", line 817, in runner
        await self.start(token, reconnect=reconnect)
      File "C:\Users\litov\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\client.py", line 746, in start
        await self.connect(reconnect=reconnect)
      File "C:\Users\litov\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\client.py", line 672, in connect
        raise PrivilegedIntentsRequired(exc.shard_id) from None
    discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.

    Бот имеет права администратора, которые были включены непосредственно на портале разработчика. Что делать?
    Ответ написан
    Комментировать