JonnyPtn / zomboi

A discord bot for project zomboid multiplayer servers
49 stars 32 forks source link

Privileges #66

Closed danilo1105 closed 1 year ago

danilo1105 commented 1 year ago

I'm getting this error with the bot with Admin privileges. Can someone help me?

pzserver@pzserver:~/zomboid-bot$ python zomboi.py
2023-01-16 10:53:02 INFO     discord.client logging in using static token
Traceback (most recent call last):
  File "/home/pzserver/zomboid-bot/zomboi.py", line 83, in <module>
    zomboi.run(os.getenv("DISCORD_TOKEN"))
  File "/home/pzserver/.local/lib/python3.9/site-packages/discord/client.py", line 828, in run
    asyncio.run(runner())
  File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/pzserver/.local/lib/python3.9/site-packages/discord/client.py", line 817, in runner
    await self.start(token, reconnect=reconnect)
  File "/home/pzserver/.local/lib/python3.9/site-packages/discord/client.py", line 746, in start
    await self.connect(reconnect=reconnect)
  File "/home/pzserver/.local/lib/python3.9/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.
pzserver@pzserver:~/zomboid-bot$
Jan64X commented 1 year ago

I'm also having this issue

JonnyPtn commented 1 year ago

This is referring to discord privileges not the bot process. As mentioned in the error message, you need to go to your discord developer portal and enable the required intents (members, guilds and message content)