Markoudstaal / node-red-contrib-discord-advanced

Recieve, send, edit and delete Discord messages in node-red.
MIT License
46 stars 16 forks source link

Change setActivity to setPresence #76

Closed javis86 closed 1 year ago

javis86 commented 1 year ago

As a better approach, the function setPresence() has a wide range of possibilities setting status of the bot.

An input could be:

{ 
activities: { 
    name: 'with discord.js' ,
    url:'www.twitch.com/my-channel',
    type: 'streaming'
}, 
status: 'idle' 
}

To return to a default status, could be sending a empty object.

SetPresence PresenceStatusData ActivityOptions ActivityType

javis86 commented 1 year ago

@dochardi Would you like to do it? Are you agree with this approach instead? I Tested setActivity, one issue is i cannot set activity back from "Streaming ...."

dochardi commented 1 year ago

The code are change and We have now added the Online status and the ActivityType as msg. and add are reste of the Activity by using msg.type=6, all info can by found in the node documentation in node-red.