Class ExtendedInvite

    • Constructor Detail

      • ExtendedInvite

        public ExtendedInvite​(GatewayDiscordClient gateway,
                              discord4j.discordjson.json.InviteData data)
        Constructs a ExtendedInvite with an associated GatewayDiscordClient and Discord data.
        Parameters:
        gateway - The GatewayDiscordClient associated to this object, must be non-null.
        data - The raw data as represented by Discord, must be non-null.
    • Method Detail

      • getUses

        public int getUses()
        Gets the number of times this invite has been used.
        Returns:
        The number of times this invite has been used.
      • getMaxUses

        public int getMaxUses()
        Gets the max number of times this invite can be used.
        Returns:
        The max number of times this invite can be used.
      • getExpiration

        public Optional<Instant> getExpiration()
        Gets the instant this invite expires, if possible.
        Returns:
        The instant this invite expires, if possible.
      • getCreation

        public Instant getCreation()
        Gets when this invite was created.
        Returns:
        When this invite was created.