Jump to content
McKay Development

Recommended Posts

Posted

I'm using steam-user 5.2.0 and I'm having an issue with the notificationsReceived event. My bot listens for new notifications, but the event only triggers when I manually open the Steam notifications tab in the client or web browser. If a new notification arrives while the bot is running, the event does not fire automatically.

I'm specifically trying to get notifications from forums I'm subscribed to. Could you double-check if the event is working as expected?

Here my code: 

// Event handler for notifications received
user.on('notificationsReceived', async function(payload) {
    const notification = payload.notifications[0];

    if (notification.type == 3 && notification.body && notification.body.type == '7') {
        const discussionId = notification.body.topic_id;

        console.log(`Received notification for discussion ${discussionId}`);
    }
});

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...