Cannot subscribe to some RPC events, the events do not fire
See original GitHub issueMy application has to detect when the user joins to a voice channel and then detect updates on that voice channel.
The VOICE_CHANNEL_SELECT
event is working fine, but VOICE_STATE_CREATE / VOICE_STATE_UPDATE / VOICE_STATE_DELETE
events do not fire at all.
The event API just for convenience: https://discord.com/developers/docs/topics/rpc#commands-and-events
const RPC = require('discord-rpc');
const cfg = {
clientId: 'hidden',
clientSecret: 'hidden',
scopes: ['rpc']
}
RPC.register(cfg.clientId);
const client = new RPC.Client({ transport: 'ipc' });
client.on('ready', () => {
console.log('Logged in as', client.application.name);
console.log('Authed for user', client.user.username);
client.subscribe('VOICE_CHANNEL_SELECT', function (channel) { // This one works fine
if (channel.channel_id == null) return;
client.subscribe('VOICE_STATE_CREATE', channel, (voice_status) => { // This one and the ones below never fire
console.log(voice_status);
});
client.subscribe('VOICE_STATE_UPDATE', channel, (voice_status) => {
console.log(voice_status);
});
client.subscribe('VOICE_STATE_DELETE', channel, (voice_status) => {
console.log(voice_status);
});
}
}
client.login({ clientId: cfg.clientId, clientSecret: cfg.clientSecret, scopes: cfg.scopes, redirectUri: 'https://localhost:8080/authorize'}).catch(console.error);
any thoughts? thanks in advance.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Subscribe to Platform Events Unit | Salesforce Trailhead
With platform events, the process is similar. You simply write an after insert Apex trigger on the event object to subscribe to incoming...
Read more >Event based transparent Client/Server RPC framework
Event ::RPC consists of a server and a client library. The server exports a list of classes and methods, which are allowed to...
Read more >Synapse failed to unsubscribe to events for event trigger ...
Synapse tries to delete something that does not exist anymore and fails to do ... Id has Contributor access to the event grid...
Read more >RPCs and RaiseEvent - Fusion Introduction | Photon Engine
We will support Unity 2022 with PUN 2, but no new features will be added. ... already used by Photon itself, so you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
this issue has been resolved as of v4.0.1
@devsnek not sure why these issues / PRs were closed – the issue still exists. I have my personal projects pointing at my github branch as a dep, as this issue is not fixed.