Interface OAuth2Guild

All Superinterfaces:
net.dv8tion.jda.api.entities.ISnowflake
All Known Implementing Classes:
OAuth2GuildImpl

public interface OAuth2Guild extends net.dv8tion.jda.api.entities.ISnowflake
OAuth2 representation of a Discord Server/Guild.

Note that this is effectively a wrapper for both the Guild info, as well as the info on the user in the guild represented by the session that got this Guild.

Author:
John Grosh ([email protected]), Kaidan Gustave
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the underlying OAuth2Client that created this OAuth2Guild.
    Gets the Guild's icon ID, or null if the Guild does not have an icon.
    Gets the Guild's icon URL, or null if the Guild does not have an icon.
    Gets the Guild's name.
    EnumSet<net.dv8tion.jda.api.Permission>
    Gets the Session User's Permissions for the Guild.
    long
    Gets the Session User's raw permission value for the Guild.
    boolean
    hasPermission(net.dv8tion.jda.api.Permission... perms)
    Whether or not the Session User has all of the specified Permissions in the Guild.
    boolean
    Whether or not the Session User is the owner of the Guild.

    Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake

    getId, getIdLong, getTimeCreated
  • Method Details

    • getClient

      OAuth2Client getClient()
      Gets the underlying OAuth2Client that created this OAuth2Guild.
      Returns:
      The OAuth2Client that created this OAuth2Guild.
    • getName

      String getName()
      Gets the Guild's name.
      Returns:
      The Guild's name.
    • getIconId

      String getIconId()
      Gets the Guild's icon ID, or null if the Guild does not have an icon.
      Returns:
      The Guild's icon ID.
    • getIconUrl

      String getIconUrl()
      Gets the Guild's icon URL, or null if the Guild does not have an icon.
      Returns:
      The Guild's icon URL.
    • getPermissionsRaw

      long getPermissionsRaw()
      Gets the Session User's raw permission value for the Guild.
      Returns:
      The Session User's raw permission value for the Guild.
    • getPermissions

      EnumSet<net.dv8tion.jda.api.Permission> getPermissions()
      Gets the Session User's Permissions for the Guild.
      Returns:
      The Session User's Permissions for the Guild.
    • isOwner

      boolean isOwner()
      Whether or not the Session User is the owner of the Guild.
      Returns:
      true if the Session User is the owner of the Guild, false otherwise.
    • hasPermission

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