def METHOD_NAME(self, details, state=None):
    if not self.discordrp:
        try:
            self.discordrp = Presence(QL_DISCORD_RP_ID, pipe=0)
            self.discordrp.connect()
        except (DiscordNotFound, ConnectionRefusedError):
            self.discordrp = None
    if self.discordrp:
        try:
            self.discordrp.update(details=details, state=state,
                            large_image=QL_LARGE_IMAGE)
        except InvalidID:
            # XXX Discord was closed?
            self.discordrp = None