PygDiscordBot icon indicating copy to clipboard operation
PygDiscordBot copied to clipboard

Error when using run.bat

Open rcchan123 opened this issue 3 years ago • 1 comments

When I open run.bat, this message pops up in the terminal:

Traceback (most recent call last):
File "C:\Users\Ralph\PygDiscordBot\discordbot.py", line 41, in <module>
bot.always_reply = True if ALWAYS_REPLY.lower() == "t" else False
AttributeError: 'NoneType' object has no attribute 'lower'
Press any key to continue . . .

rcchan123 avatar Oct 13 '23 12:10 rcchan123

Hey! 👋 Thanks for reporting this.

I've opened PR #46 to fix the AttributeError you're seeing. It happens when the ALWAYS_REPLY variable isn't set, so this PR adds a check to handle that case and prevent the crash.

Feel free to take a look!

webbrain-one avatar Aug 13 '26 03:08 webbrain-one