ausboss/PygDiscordBot

AttributeError: 'NoneType' object has no attribute 'split'

Closed this issue · 2 comments

I encountered an error while using the Discord bot script (discordbot.py). The error message states: "AttributeError: 'NoneType' object has no attribute 'split'". This issue prevents the bot from functioning

if len(bot.endpoint.split("/api")) > 0:
^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'split'

did you set up the env with the url to the endpoint?

gif

Also I just pushed a change that to makes sure the endpoint from the .env is a string

I also pushed a change just now that might fix