Package discord4j.core.object
Class ScheduledEventUser
- java.lang.Object
-
- discord4j.core.object.ScheduledEventUser
-
- All Implemented Interfaces:
DiscordObject
public class ScheduledEventUser extends Object implements DiscordObject
-
-
Constructor Summary
Constructors Constructor Description ScheduledEventUser(GatewayDiscordClient gateway, discord4j.discordjson.json.GuildScheduledEventUserData data, Snowflake guildId)
Constructs aScheduledEventUser
with an associatedGatewayDiscordClient
and Discord data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GatewayDiscordClient
getClient()
Returns theGatewayDiscordClient
that created this object.Snowflake
getEventId()
Gets the ID of the event the user is subscribed to.Optional<PartialMember>
getMember()
Gets thePartialMember
, if the user is a member of the guild the event is belongs to.User
getUser()
Gets theUser
subscribed to the event.String
toString()
-
-
-
Constructor Detail
-
ScheduledEventUser
public ScheduledEventUser(GatewayDiscordClient gateway, discord4j.discordjson.json.GuildScheduledEventUserData data, Snowflake guildId)
Constructs aScheduledEventUser
with an associatedGatewayDiscordClient
and Discord data.- Parameters:
gateway
- TheGatewayDiscordClient
associated with this object, must be non-null.data
- The raw data as represented by Discord, must be non-null.guildId
- The ID of the guild the event belongs to, must be non-null.
-
-
Method Detail
-
getClient
public GatewayDiscordClient getClient()
Description copied from interface:DiscordObject
Returns theGatewayDiscordClient
that created this object. Methods in it are exclusively based on the entity cache orStore
in use. Refer to callinggetClient().rest()
to access aDiscordClient
that is capable of requesting entities directly from the REST API.- Specified by:
getClient
in interfaceDiscordObject
- Returns:
- The
GatewayDiscordClient
associated to this object.
-
getEventId
public Snowflake getEventId()
Gets the ID of the event the user is subscribed to.- Returns:
- The ID of the event the user is subscribed to.
-
getUser
public User getUser()
Gets theUser
subscribed to the event.- Returns:
- The
User
subscribed to the event.
-
getMember
public Optional<PartialMember> getMember()
Gets thePartialMember
, if the user is a member of the guild the event is belongs to.- Returns:
- The
PartialMember
, if the user is a member of the guild the event is belongs to.
-
-