0

Could someone help me with this newbie question?

I'm trying to set the Bot presence using setPresence node, but without success until now. I tried a lot of ways to pass the presence state, but didn't work.

Do you know what I'm doing wrong?

tks

msg.payload = { presence: { presenceState: { state: "AVAILABLE" } } }

msg.payload = { presence: { state: "AVAILABLE" } }

msg.payload = { presence: { presence: { state: "AVAILABLE" } } }

4

1 回答 1

0

您在那里的第二个示例看起来应该可以工作。下面的代码对我有用。您可以在此处查看不同的状态:https ://circuitsandbox.net/sdk/classes/PresenceState.html 。

msg.payload = {
    presence: {
        state: Math.random() > .5 ? 'AWAY' : 'AVAILABLE'
    }
}
return msg;
于 2019-09-12T00:35:29.307 回答