Class Guild

java.lang.Object
com.mrivanplays.jdoa2.Guild
All Implemented Interfaces:
ISnowflake

public class Guild extends Object implements ISnowflake
Represents a guild object, holding information about the CurrentUser's state, and also holding very basic information about the guild itself.
  • Constructor Details

    • Guild

      public Guild(String id, String name, String icon, boolean owner, int permissions)
  • Method Details

    • getId

      @Nonnull public String getId()
      Returns the snowflake, this object is holding.
      Specified by:
      getId in interface ISnowflake
      Returns:
      id snowflake
    • getName

      @Nonnull public String getName()
      Returns the guild's name.
      Returns:
      guild name
    • getIcon

      @Nullable public String getIcon()
      Returns the guild's icon hash
      Returns:
      icon hash
    • getIconUrl

      @Nullable public String getIconUrl()
      Returns the guild's icon url, if the guild has icon.
      Returns:
      icon url
    • isOwner

      public boolean isOwner()
      Returns whenever the CurrentUser is owner of this guild.

      A owner represents the user, who have created the guild, and not a user, which has a role which gives him most of the permissions.

      Returns:
      true if owner, false otherwise
    • getPermissions

      public int getPermissions()
      Returns total permissions for the CurrentUser in this guild. You must have knowledge of binary and stuff in order to calculate them.

      See: Permissions (discord api documentation)

      Returns:
      permission