Class OAuth2GuildImpl
java.lang.Object
com.jagrosh.jdautilities.oauth2.entities.impl.OAuth2GuildImpl
- All Implemented Interfaces:
OAuth2Guild
,net.dv8tion.jda.api.entities.ISnowflake
- Author:
- John Grosh ([email protected])
-
Constructor Summary
ConstructorDescriptionOAuth2GuildImpl
(OAuth2Client client, long id, String name, String icon, boolean owner, long permissions) -
Method Summary
Modifier and TypeMethodDescriptionGets the underlyingOAuth2Client
that created this OAuth2Guild.Gets the Guild's icon ID, ornull
if the Guild does not have an icon.Gets the Guild's icon URL, ornull
if the Guild does not have an icon.long
getName()
Gets the Guild's name.EnumSet<net.dv8tion.jda.api.Permission>
Gets the Session User'sPermissions
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 specifiedPermissions
in the Guild.boolean
isOwner()
Whether or not the Session User is the owner of the Guild.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
Constructor Details
-
OAuth2GuildImpl
public OAuth2GuildImpl(OAuth2Client client, long id, String name, String icon, boolean owner, long permissions)
-
-
Method Details
-
getClient
Description copied from interface:OAuth2Guild
Gets the underlyingOAuth2Client
that created this OAuth2Guild.- Specified by:
getClient
in interfaceOAuth2Guild
- Returns:
- The OAuth2Client that created this OAuth2Guild.
-
getIdLong
public long getIdLong()- Specified by:
getIdLong
in interfacenet.dv8tion.jda.api.entities.ISnowflake
-
getName
Description copied from interface:OAuth2Guild
Gets the Guild's name.- Specified by:
getName
in interfaceOAuth2Guild
- Returns:
- The Guild's name.
-
getIconId
Description copied from interface:OAuth2Guild
Gets the Guild's icon ID, ornull
if the Guild does not have an icon.- Specified by:
getIconId
in interfaceOAuth2Guild
- Returns:
- The Guild's icon ID.
-
getIconUrl
Description copied from interface:OAuth2Guild
Gets the Guild's icon URL, ornull
if the Guild does not have an icon.- Specified by:
getIconUrl
in interfaceOAuth2Guild
- 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 interfaceOAuth2Guild
- Returns:
- The Session User's raw permission value for the Guild.
-
getPermissions
Description copied from interface:OAuth2Guild
Gets the Session User'sPermissions
for the Guild.- Specified by:
getPermissions
in interfaceOAuth2Guild
- 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 interfaceOAuth2Guild
- 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 specifiedPermissions
in the Guild.- Specified by:
hasPermission
in interfaceOAuth2Guild
- Parameters:
perms
- The Permissions to check for.- Returns:
true
if and only if the Session User has all of the specified Permissions,false
otherwise.
-