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 TypeMethodDescriptionGets the underlyingOAuth2Clientthat created this OAuth2Guild.Gets the Guild's icon ID, ornullif the Guild does not have an icon.Gets the Guild's icon URL, ornullif the Guild does not have an icon.getName()Gets the Guild's name.EnumSet<net.dv8tion.jda.api.Permission>Gets the Session User'sPermissionsfor the Guild.longGets the Session User's raw permission value for the Guild.booleanhasPermission(net.dv8tion.jda.api.Permission... perms) Whether or not the Session User has all of the specifiedPermissionsin the Guild.booleanisOwner()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 underlyingOAuth2Clientthat 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, ornullif the Guild does not have an icon.- Returns:
- The Guild's icon ID.
-
getIconUrl
String getIconUrl()Gets the Guild's icon URL, ornullif 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'sPermissionsfor 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:
trueif the Session User is the owner of the Guild,falseotherwise.
-
hasPermission
boolean hasPermission(net.dv8tion.jda.api.Permission... perms) Whether or not the Session User has all of the specifiedPermissionsin the Guild.- Parameters:
perms- The Permissions to check for.- Returns:
trueif and only if the Session User has all of the specified Permissions,falseotherwise.
-