Yesterday, my code was perfectly fine. Everything was running... and it was going great. All of a sudden, this error:
TypeError: __new__() got an unexpected k
I want to clarify the answer. On a raspberry pi, I somehow had discord.py installed for user pi and for root - and they were different versions in different places. This caused me a lot of confusion; I had no idea I had two copies, and I have no idea how to get down to just 1, which I'd prefer. But the commands that get it working for root are:
sudo -i
pip3 uninstall discord.py
pip3 install discord.py
python3 -m pip install -U discord.py
Then and only then could I run my discord bot from /etc/rc.local, and for that to work I had to do this in /etc/rc.local:
(sleep 30; python3 /home/pi/applications/myBot.py &) &
For whatever reason, the usual suggestion of sleep 10 did NOT work, and this is on a pi 4 with not a lot else going on at startup.