mirror of
https://github.com/lutris/lutris
synced 2024-09-04 23:13:35 +00:00
Silence more Discord errors
This commit is contained in:
parent
326f9d12fb
commit
e98f19f5e0
|
@ -1,4 +1,4 @@
|
|||
from pypresence import Presence
|
||||
from pypresence import Presence, DiscordNotFound
|
||||
|
||||
from lutris.util.discord.base import DiscordRichPresenceBase
|
||||
|
||||
|
@ -17,9 +17,11 @@ class DiscordRichPresenceClient(DiscordRichPresenceBase):
|
|||
|
||||
# Create a new Presence object with the desired app id
|
||||
self.rpc = Presence(discord_id)
|
||||
# Connect to discord endpoint
|
||||
self.rpc.connect()
|
||||
# Trigger an update making the status available
|
||||
try:
|
||||
self.rpc.connect()
|
||||
except DiscordNotFound:
|
||||
return
|
||||
|
||||
self.rpc.update()
|
||||
|
||||
def clear(self):
|
||||
|
|
Loading…
Reference in a new issue