Class OAuth2GuildImpl

java.lang.Object
com.jagrosh.jdautilities.oauth2.entities.impl.OAuth2GuildImpl
All Implemented Interfaces:
OAuth2Guild, net.dv8tion.jda.api.entities.ISnowflake

public class OAuth2GuildImpl extends Object implements OAuth2Guild
Author:
John Grosh ([email protected])
  • Constructor Details

    • OAuth2GuildImpl

      public OAuth2GuildImpl(OAuth2Client client, long id, String name, String icon, boolean owner, long permissions)
  • Method Details

    • getClient

      public OAuth2Client getClient()
      Description copied from interface: OAuth2Guild
      Gets the underlying OAuth2Client that created this OAuth2Guild.
      Specified by:
      getClient in interface OAuth2Guild
      Returns:
      The OAuth2Client that created this OAuth2Guild.
    • getIdLong

      public long getIdLong()
      Specified by:
      getIdLong in interface net.dv8tion.jda.api.entities.ISnowflake
    • getName

      public String getName()
      Description copied from interface: OAuth2Guild
      Gets the Guild's name.
      Specified by:
      getName in interface OAuth2Guild
      Returns:
      The Guild's name.
    • getIconId

      public String getIconId()
      Description copied from interface: OAuth2Guild
      Gets the Guild's icon ID, or null if the Guild does not have an icon.
      Specified by:
      getIconId in interface OAuth2Guild
      Returns:
      The Guild's icon ID.
    • getIconUrl

      public String getIconUrl()
      Description copied from interface: OAuth2Guild
      Gets the Guild's icon URL, or null if the Guild does not have an icon.
      Specified by:
      getIconUrl in interface OAuth2Guild
      Returns:
      The Guild's icon URL.
    • getPermissionsRaw

      public long getPermissionsRaw()
      Description copied from interface: OAuth2Guild
      Gets the Session User's raw permission value for the Guild.
      Specified by:
      getPermissionsRaw in interface OAuth2Guild
      Returns:
      The Session User's raw permission value for the Guild.
    • getPermissions

      public EnumSet<net.dv8tion.jda.api.Permission> getPermissions()
      Description copied from interface: OAuth2Guild
      Gets the Session User's Permissions for the Guild.
      Specified by:
      getPermissions in interface OAuth2Guild
      Returns:
      The Session User's Permissions for the Guild.
    • isOwner

      public boolean isOwner()
      Description copied from interface: OAuth2Guild
      Whether or not the Session User is the owner of the Guild.
      Specified by:
      isOwner in interface OAuth2Guild
      Returns:
      true if the Session User is the owner of the Guild, false otherwise.
    • hasPermission

      public boolean hasPermission(net.dv8tion.jda.api.Permission... perms)
      Description copied from interface: OAuth2Guild
      Whether or not the Session User has all of the specified Permissions in the Guild.
      Specified by:
      hasPermission in interface OAuth2Guild
      Parameters:
      perms - The Permissions to check for.
      Returns:
      true if and only if the Session User has all of the specified Permissions, false otherwise.