@Experimental public class MessageReference extends Object implements DiscordObject
Constructor and Description |
---|
MessageReference(GatewayDiscordClient gateway,
discord4j.discordjson.json.MessageReferenceData data)
Constructs a
MessageReference with an associated GatewayDiscordClient and Discord data. |
Modifier and Type | Method and Description |
---|---|
Snowflake |
getChannelId() |
GatewayDiscordClient |
getClient()
Returns the
GatewayDiscordClient that created this object. |
Optional<Snowflake> |
getGuildId() |
Optional<Snowflake> |
getMessageId() |
String |
toString() |
public MessageReference(GatewayDiscordClient gateway, discord4j.discordjson.json.MessageReferenceData data)
MessageReference
with an associated GatewayDiscordClient
and Discord data.gateway
- The GatewayDiscordClient
associated to this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.public Snowflake getChannelId()
public GatewayDiscordClient getClient()
DiscordObject
GatewayDiscordClient
that created this object. Methods in it are exclusively based on the
entity cache or Store
in use. Refer to calling getClient().rest()
to access a
DiscordClient
that is capable of requesting entities directly from the REST API.getClient
in interface DiscordObject
GatewayDiscordClient
associated to this object.