Class RestResources

java.lang.Object
discord4j.rest.RestResources

public class RestResources extends Object
A set of resources required for key Discord4J features like entity manipulation and API communication.
  • Constructor Details

  • Method Details

    • getScheme

      public AuthorizationScheme getScheme()
    • getToken

      public String getToken()
      Return the bot token used to authenticate requests.
      Returns:
      the bot token
    • getReactorResources

      public ReactorResources getReactorResources()
      Return Reactor resources to establish connections and schedule tasks.
      Returns:
      a configured ReactorResources instance
    • getJacksonResources

      public JacksonResources getJacksonResources()
      Return Jackson resources to transform objects.
      Returns:
      a configured JacksonResources instance
    • getRouter

      public Router getRouter()
      Return the Router tied to this resources object.
      Returns:
      a configured Router instance
    • getSelfId

      public Snowflake getSelfId()
      Gets the bot user's ID.
      Returns:
      The bot user's ID.
    • getAllowedMentions

      public Optional<AllowedMentions> getAllowedMentions()
      Return the configured AllowedMentions, if present.
      Returns:
      the configured allowed mentions setting or empty Optional if none was configured