- 39
- 7
Хелпаните бот не запускается. Хотя взял с примера на гит хабе.
вот код
2022-12-02 10:50:40 INFO discord.client logging in using static token
Traceback (most recent call last):
File "C:\Users\cawa1\Documents\bot discord\discord-bot.py", line 12, in <module>
bot.run('MTA0Nzk3NTA1ODA3MDU4NTQ4NQ.GkRbkF.6HcqLHfWnl-7lf1Jjban6tUCfeLqUIkHgJbfcQ')
File "C:\Users\cawa1\Documents\bot discord\venv\Lib\site-packages\discord\client.py", line 828, in run
asyncio.run(runner())
File "C:\Users\cawa1\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\cawa1\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cawa1\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\cawa1\Documents\bot discord\venv\Lib\site-packages\discord\client.py", line 817, in runner
await self.start(token, reconnect=reconnect)
File "C:\Users\cawa1\Documents\bot discord\venv\Lib\site-packages\discord\client.py", line 746, in start
await self.connect(reconnect=reconnect)
File "C:\Users\cawa1\Documents\bot discord\venv\Lib\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.
Traceback (most recent call last):
File "C:\Users\cawa1\Documents\bot discord\discord-bot.py", line 12, in <module>
bot.run('MTA0Nzk3NTA1ODA3MDU4NTQ4NQ.GkRbkF.6HcqLHfWnl-7lf1Jjban6tUCfeLqUIkHgJbfcQ')
File "C:\Users\cawa1\Documents\bot discord\venv\Lib\site-packages\discord\client.py", line 828, in run
asyncio.run(runner())
File "C:\Users\cawa1\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\cawa1\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\cawa1\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 650, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\cawa1\Documents\bot discord\venv\Lib\site-packages\discord\client.py", line 817, in runner
await self.start(token, reconnect=reconnect)
File "C:\Users\cawa1\Documents\bot discord\venv\Lib\site-packages\discord\client.py", line 746, in start
await self.connect(reconnect=reconnect)
File "C:\Users\cawa1\Documents\bot discord\venv\Lib\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.
вот код
import discord
from discord.ext import commands
intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix='>', intents=intents)
@bot.command()
async def ping(ctx):
await ctx.send('pong')
bot.run('token')
from discord.ext import commands
intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix='>', intents=intents)
@bot.command()
async def ping(ctx):
await ctx.send('pong')
bot.run('token')