Record Class InteractionContext
java.lang.Object
java.lang.Record
de.chojo.jdautil.interactions.dispatching.InteractionContext
public record InteractionContext(Interaction interaction, String args, Guild guild, MessageChannel channel, User user)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionInteractionContext(Interaction interaction, String args, Guild guild, MessageChannel channel, User user) Creates an instance of aInteractionContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionargs()Returns the value of theargsrecord component.channel()Returns the value of thechannelrecord component.final booleanIndicates whether some other object is "equal to" this one.guild()Returns the value of theguildrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinteractionrecord component.final StringtoString()Returns a string representation of this record class.user()Returns the value of theuserrecord component.
-
Constructor Details
-
InteractionContext
public InteractionContext(Interaction interaction, String args, Guild guild, MessageChannel channel, User user) Creates an instance of aInteractionContextrecord class.- Parameters:
interaction- the value for theinteractionrecord componentargs- the value for theargsrecord componentguild- the value for theguildrecord componentchannel- the value for thechannelrecord componentuser- the value for theuserrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
interaction
Returns the value of theinteractionrecord component.- Returns:
- the value of the
interactionrecord component
-
args
Returns the value of theargsrecord component.- Returns:
- the value of the
argsrecord component
-
guild
Returns the value of theguildrecord component.- Returns:
- the value of the
guildrecord component
-
channel
Returns the value of thechannelrecord component.- Returns:
- the value of the
channelrecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-