qwertyquerty / pypresence

A complete Discord IPC and Rich Presence wrapper library in Python!
https://qwertyquerty.github.io/pypresence/html/index.html
MIT License
645 stars 77 forks source link

Fix `get_ipc_path()` when `pipe=0`` #232

Closed davispuh closed 6 months ago

davispuh commented 8 months ago

Sometimes Discord creates multiple IPCs like discord-ipc-0, discord-ipc-1 . Current implementation found/used discord-ipc-1 which failed to connect. And passing pipe=0 also failed because it's considered Falsy and thus we still used same 'discord-ipc-' pattern. This PR makes pipe=0 work and correctly uses discord-ipc-0