Role Well Being Live

So what i am trying to look into creating is a script that will set a user to the live role when there streaming then remove it again when they go offline i have found a snipit of code that could help me do this i just need to know if the bot has access to this using discord4j

Here is the code that id need to edit for it to work :slight_smile: i just need to find a way to get activity.type using Discord4J

try {
    let activity = member.presence.activity
    let roles = => member.guild.roles.get(x))
    if (activity !== null && activity.type === 'STREAMING') {
      // Add Roles
      for (let role of roles) { member.roles.add(role) }
      // Announce
      if (announce) announceMessages(member, announce, settings)

      // Push to DB
      settings.liveIDs = Array.from(new Set([...settings.liveIDs,]))
      await setData(, settings)
    } else {
      // Remove Roles
      for (let role of roles) { member.roles.remove(role) }

      // Push to DB
      settings.liveIDs = settings.liveIDs.filter(x => x !==
      await setData(, settings)

i know there is discord4j.core.object.presence.Activity.Type but im not sure that is in the version of Discord4J that we use