Class ThreadListSyncEvent


public class ThreadListSyncEvent extends ThreadEvent
Sent when the current user gains access to a channel.
See Also:
  • Constructor Details

    • ThreadListSyncEvent

      public ThreadListSyncEvent(GatewayDiscordClient gateway, ShardInfo shardInfo, discord4j.discordjson.json.gateway.ThreadListSync dispatch)
  • Method Details

    • getGuildId

      public Snowflake getGuildId()
      Returns the ID of the guild for this event.
      Returns:
      a Snowflake guild ID for this event
    • getSyncedChannelIds

      public Optional<List<Snowflake>> getSyncedChannelIds()
      Returns the parent channel IDs whose threads are being synced. If absent, then threads were synced for the entire guild. This array may contain channel IDs that have no active threads as well.
      Returns:
      if present, a list of Snowflake channel IDs that are having their threads synced, otherwise if absent, means this sync event is for the entire guild.
    • getSyncedThreads

      public List<ThreadChannel> getSyncedThreads()
      Returns all active threads in the given channels that the current user can access.
      Returns:
      a list of ThreadChannel with all active threads for the current user
    • getThreadMembers

      public List<ThreadMember> getThreadMembers()
      Returns all thread member objects from the synced threads for the current user, indicating which threads the current user has been added to
    • toString

      public String toString()
      Overrides:
      toString in class Object