Zero6992 / chatGPT-discord-bot

Integrate ChatGPT into your own discord bot
GNU General Public License v2.0
2.6k stars 699 forks source link

Error starting bot #414

Closed dinushay closed 9 months ago

dinushay commented 1 year ago
2023-05-31 09:16:21 INFO     discord.client logging in using static token
Traceback (most recent call last):
  File "/root/discordai/main.py", line 30, in <module>
    bot.run_discord_bot()
  File "/root/discordai/src/bot.py", line 339, in run_discord_bot
    client.run(TOKEN)
  File "/root/miniconda3/lib/python3.10/site-packages/discord/client.py", line 860, in run
    asyncio.run(runner())
  File "/root/miniconda3/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/root/miniconda3/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/root/miniconda3/lib/python3.10/site-packages/discord/client.py", line 849, in runner
    await self.start(token, reconnect=reconnect)
  File "/root/miniconda3/lib/python3.10/site-packages/discord/client.py", line 777, in start
    await self.login(token)
  File "/root/miniconda3/lib/python3.10/site-packages/discord/client.py", line 609, in login
    raise TypeError(f'expected token to be a str, received {token.__class__.__name__} instead')
TypeError: expected token to be a str, received NoneType instead
Zero6992 commented 1 year ago

check your .env file

similar issue here #363

dinushay commented 1 year ago

my .env file is fine i guess but it's still not working

Screenshot 2023-05-31 102830 Screenshot 2023-05-31 102818

Zero6992 commented 1 year ago

This error occurred because your environment variable was not read correctly, possibly due to a conflict in the Minicodna environment

Zero6992 commented 1 year ago

You can initialize everything and either use a new environment in conda or test it locally