Record Class YusufOptionMapping

java.lang.Object
java.lang.Record
io.github.yusufsdiscordbot.yusufsdiscordcore.bot.command_option.YusufOptionMapping

public record YusufOptionMapping(net.dv8tion.jda.api.interactions.commands.OptionMapping optionMapping) extends Record
  • Constructor Details

    • YusufOptionMapping

      public YusufOptionMapping(net.dv8tion.jda.api.interactions.commands.OptionMapping optionMapping)
      Creates an instance of a YusufOptionMapping record class.
      Parameters:
      optionMapping - the value for the optionMapping record component
  • Method Details

    • getMentionedMembers

      @Nonnull public List<YMember> getMentionedMembers()
    • getMentionedUsers

      @Nonnull public List<YUser> getMentionedUsers()
    • getMentionedRoles

      @Nonnull public List<net.dv8tion.jda.api.entities.Role> getMentionedRoles()
    • getMentionedChannels

      @Nonnull public List<net.dv8tion.jda.api.entities.GuildChannel> getMentionedChannels()
    • getMentions

      @Nonnull public List<net.dv8tion.jda.api.entities.IMentionable> getMentions()
    • getType

      @Nonnull public net.dv8tion.jda.api.interactions.commands.OptionType getType()
    • getName

      @Nonnull public String getName()
    • getAsMember

      @NotNull public @NotNull YMember getAsMember()
    • getAsUser

      @Nonnull public YUser getAsUser()
    • getAsBoolean

      public boolean getAsBoolean()
    • getAsLong

      public long getAsLong()
    • getAsDouble

      public double getAsDouble()
    • getAsString

      @NotNull public @NotNull String getAsString()
    • getAsMentionable

      @Nonnull public net.dv8tion.jda.api.entities.IMentionable getAsMentionable()
    • getAsRole

      @Nonnull public net.dv8tion.jda.api.entities.Role getAsRole()
    • getAsGuildChannel

      @Nonnull public net.dv8tion.jda.api.entities.GuildChannel getAsGuildChannel()
    • getAsMessageChannel

      @Nullable public net.dv8tion.jda.api.entities.MessageChannel getAsMessageChannel()
    • getChannelType

      @Nonnull public net.dv8tion.jda.api.entities.ChannelType getChannelType()
    • getAsTextChannel

      @Nullable public net.dv8tion.jda.api.entities.TextChannel getAsTextChannel()
    • getAsNewsChannel

      @Nullable public net.dv8tion.jda.api.entities.NewsChannel getAsNewsChannel()
    • getAsThreadChannel

      @Nullable public net.dv8tion.jda.api.entities.ThreadChannel getAsThreadChannel()
    • getAsAudioChannel

      @Nullable public net.dv8tion.jda.api.entities.AudioChannel getAsAudioChannel()
    • getAsVoiceChannel

      @Nullable public net.dv8tion.jda.api.entities.VoiceChannel getAsVoiceChannel()
    • getAsStageChannel

      @Nullable public net.dv8tion.jda.api.entities.StageChannel getAsStageChannel()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • optionMapping

      public net.dv8tion.jda.api.interactions.commands.OptionMapping optionMapping()
      Returns the value of the optionMapping record component.
      Returns:
      the value of the optionMapping record component