Interface IDetachableEntity

All Known Subinterfaces:
AudioChannel, AudioChannelUnion, Category, Channel, ChannelUnion, DefaultGuildChannelUnion, ForumChannel, GroupChannel, Guild, GuildChannel, GuildChannelUnion, GuildMessageChannel, GuildMessageChannelUnion, IAgeRestrictedChannel, ICategorizableChannel, ICopyableChannel, IInviteContainer, IMemberContainer, IPermissionContainer, IPermissionContainerUnion, IPositionableChannel, IPostContainer, ISlowmodeChannel, IThreadContainer, IThreadContainerUnion, IVoiceStatusChannel, IWebhookContainer, IWebhookContainerUnion, MediaChannel, Member, MessageChannel, MessageChannelUnion, NewsChannel, PrivateChannel, Role, StageChannel, StandardGuildChannel, StandardGuildMessageChannel, TextChannel, ThreadChannel, VoiceChannel

public interface IDetachableEntity
Represents an entity which can be detached.

A detached entity is one that was created from a potentially partial snapshot at some point in time, they are never cached and thus cannot be retrieved, nor be updated.

An entity may be detached when the bot does not have access to it, for example, in user-installed interactions outside guilds the bot is in, or in guilds which the bot is installed without the bot scope.

Most methods of detached entities that would otherwise return a RestAction will throw a DetachedEntityException instead.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Whether this entity is detached.
  • Method Details

    • isDetached

      boolean isDetached()
      Whether this entity is detached.

      If this returns true, this entity cannot be retrieved, will never be updated, and most methods that would otherwise return a RestAction will throw a DetachedEntityException instead.

      Returns:
      True, if the entity is detached