Interface IFakeable


  • @Deprecated
    @DeprecatedSince("4.2.1")
    @ForRemoval(deadline="4.3.0")
    public interface IFakeable
    Deprecated.
    Marks a fakeable entity.
    A fake entity (isFake() is true) is an entity which is not directly related to this instance of JDA or this JDA shard.
    An example would be a fake User.
    A fake user can occur when sharding. Discord only sends private messages to Shard 0. If a User which is connected to Guilds on shard 1 sends a private message to the logged in account, it is received on Shard 0. However, if Shard 0 does not know about the User due to not having a Guild connection with them, it will use the information provided in the MESSAGE_CREATE event to create a temporary fake user. In this case, the associated PrivateChannel is also fake!

    Another example would be a fake Emote. If a user sends a message containing an Emote from a Guild that the currently logged in account is not a part of, JDA will construct a fake Emote object for it.

    Since:
    3.0
    • Method Detail

      • isFake

        @Deprecated
        @DeprecatedSince("4.2.1")
        @ForRemoval(deadline="4.3.0")
        boolean isFake()
        Deprecated.
        Describes whether an entity is fake or not.
        Returns:
        False, if this is an actual JDA entity.