Package net.dv8tion.jda.api.entities
Interface IFakeable
-
- All Known Subinterfaces:
Emote,ListedEmote,Member,PrivateChannel,SelfUser,User,Webhook
public interface IFakeableMarks 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 fakeUser.
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 associatedPrivateChannelis also fake!Another example would be a fake
Emote. If a user sends a message containing an Emote from aGuildthat the currently logged in account is not a part of, JDA will construct a fakeEmoteobject for it.- Since:
- 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisFake()Describes whether an entity is fake or not.
-