Just-Some-Bots / MusicBot

:musical_note: The original MusicBot for Discord (formerly SexualRhinoceros/MusicBot)
https://just-some-bots.github.io/MusicBot/
MIT License
3.09k stars 2.35k forks source link

Better SSL Patch #2371

Closed itsTheFae closed 6 months ago

itsTheFae commented 6 months ago

Description

This PR extends certifi patching to the discord http client session. This deals with SSLCertVerificationError and ClientConnectorCertificateError by restarting the bot to load certifi certs only when the local trust store is missing them.

Additionally this PR addresses some issues with _cleanup() and run.py to reduce errors and remove outdated code.