java.lang.Object
java.lang.Record
io.github.yusufsdiscordbot.yusufsdiscordcore.bot.core.YBot

public record YBot(net.dv8tion.jda.api.entities.SelfUser user) extends Record
Inspiration from SelfUser
  • Constructor Details

    • YBot

      public YBot(net.dv8tion.jda.api.entities.SelfUser user)
      Creates an instance of a YBot record class.
      Parameters:
      user - the value for the user record component
  • Method Details

    • getBotIdLong

      public long getBotIdLong()
      Returns:
      the id of the bot.
    • getBotId

      @Nonnull public String getBotId()
      Returns:
      the id of the bot.
    • getBotTag

      @Nonnull public String getBotTag()
      Returns:
      the tags of the bot
    • isBotVerified

      public boolean isBotVerified()
      Check if the bot is verified or not.
      Returns:
      true if the bot is verified.
    • isMfaEnabled

      public boolean isMfaEnabled()
      If true, this account is protected by Multi-Factor authorization.
      If this is a Client account, then this describes the MFA status of the Client account.
      If this is a Bot account, then this describes the MFA status of the Client account that owns this Bot.
      Returns:
      True, if this account has MFA protecting it.
    • getMaxFileSize

      public long getMaxFileSize()
      Returns the maximum size for files that can be uploaded with this account.
      Returns 8388608 for bots.
      Returns:
      The maximum size for files that can be uploaded with this account
      See Also:
      • Message.MAX_FILE_SIZE
    • getName

      @Nonnull public String getName()
      Returns:
      the name of the bot.
    • getAvatarId

      @Nonnull public String getAvatarId()
      Returns:
      the bots' avatar id.
    • getAvatarUrl

      @Nonnull public String getAvatarUrl()
      Returns:
      the bots' avatar url.
    • getDefaultAvatarId

      @Nonnull public String getDefaultAvatarId()
      Returns:
      the bots' default avatar id.
    • getDefaultAvatarUrl

      @Nonnull public String getDefaultAvatarUrl()
      Returns:
      the bots' default avatar url.
    • retrieveProfile

      @Nonnull public net.dv8tion.jda.api.requests.RestAction<net.dv8tion.jda.api.entities.User.Profile> retrieveProfile()
    • hasPrivateChannel

      public boolean hasPrivateChannel()
    • openPrivateChannel

      @Nonnull public net.dv8tion.jda.api.requests.RestAction<net.dv8tion.jda.api.entities.PrivateChannel> openPrivateChannel()
    • getMutualGuilds

      @Nonnull public List<net.dv8tion.jda.api.entities.Guild> getMutualGuilds()
    • isBot

      public boolean isBot()
    • isSystem

      public boolean isSystem()
    • getJDA

      @Nonnull public net.dv8tion.jda.api.JDA getJDA()
    • getFlags

      @Nonnull public Set<net.dv8tion.jda.api.entities.User.UserFlag> getFlags()
    • getFlagsRaw

      public int getFlagsRaw()
    • getBotEffectiveAvatarUrl

      @Nonnull public String getBotEffectiveAvatarUrl()
      Returns:
      the bots' effective avatar url.
    • getDiscriminator

      @Nonnull public String getDiscriminator()
      Returns:
      the bots' discriminator.
    • getAsMention

      @Nonnull public String getAsMention()
    • getAsTag

      @Nonnull public String getAsTag()
    • getTimeCreated

      @NotNull public @NotNull OffsetDateTime getTimeCreated()
    • 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.
    • user

      public net.dv8tion.jda.api.entities.SelfUser user()
      Returns the value of the user record component.
      Returns:
      the value of the user record component