pydle
pydle copied to clipboard
[all] 501 Numeric is unrecognized by pydle.
Pydle complains about a 501 numeric response (meaning unknown mode) being unknown, it should probably be ignored.
I've been thinking about how to work with stuff like that for a while. They probably shouldn't be swallowed entirely as they are server error messages that can be useful in diagnosing bot behaviour. I'm considering adding a simple warning wrapper (BasicClient._warn
or something similar) and have those kind of messages just be logged as a warning. Any thoughts?
That could work fairly well, although another possible solution/debugging tool could be having an option to dump raw io to stdout/a log file. I currently am using a small wrapper around Client to do that on my debug bot.
What we currently do there is that you can set set the pydle
logger level to debug to at least get a dump of all incoming messages, and then you can attach a logging.FileHandler
to that logger. Adding outgoing messages to that is probably useful as well.
Ah, good to know that is a thing that exists.