Discord Rich Presence - How to initialise client on Angular Web App

Discussão em 'Angular' iniciado por Foxhunt, Abril 11, 2025.

  1. Foxhunt

    Foxhunt Guest

    I would like to set up rich presence for an Angular Web application (Standalone). Exactly like spotify is doing.

    What to use ?


    I tried Discord-rpc with

    setupDiscordRPC() {
    const clientId = 'XXXX';
    const scopes = ['rpc', 'rpc.api', 'messages.read'];


    const client = new Client({ transport: 'websocket' });
    client.on('ready', () => {
    console.log('Logged in as', client.application?.name);
    console.log('Authed for user', client.user?.username);
    });
    client.login({ clientId, scopes });

    }


    But there is main.ts:26 ERROR TypeError: setTimeout2 is not a function on login line

    Continue reading...

Compartilhe esta Página