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 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.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 interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Method Details
-
getClient
OAuth2Client getClient()Gets the underlyingOAuth2Client
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, ornull
if the Guild does not have an icon.- Returns:
- The Guild's icon ID.
-
getIconUrl
String getIconUrl()Gets the Guild's icon URL, ornull
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'sPermissions
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 specifiedPermissions
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.
-