Package net.discordservices.dservices4j
Class DServices4J.Builder
- java.lang.Object
-
- net.discordservices.dservices4j.DServices4J.Builder
-
- Enclosing class:
- DServices4J
public static class DServices4J.Builder extends Object
Builder class for easier setup of theDServices4J
class.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DServices4J
build()
DServices4J.Builder
setId(long id)
Sets the ID of your bot that will be used for the different endpoints.DServices4J.Builder
setId(String id)
Sets the ID of your bot that will be used for the different endpoints.DServices4J.Builder
setToken(String token)
Sets the API token (This is NOT your Bot token!)
-
-
-
Method Detail
-
setToken
public DServices4J.Builder setToken(String token)
Sets the API token (This is NOT your Bot token!) to use for the various endpoints.- Parameters:
token
- The token to set.- Returns:
- This Builder after the token was set. Useful for chaining.
-
setId
public DServices4J.Builder setId(String id)
Sets the ID of your bot that will be used for the different endpoints.- Parameters:
id
- The id to set.- Returns:
- This Builder after the id was set. Useful for chaining.
-
setId
public DServices4J.Builder setId(long id)
Sets the ID of your bot that will be used for the different endpoints.- Parameters:
id
- The id to set.- Returns:
- This Builder after the id was set. Useful for chaining.
-
build
public DServices4J build()
- Returns:
- The built, usable instance of
DServices4J
. - Throws:
IllegalArgumentException
- When either token or id are null or empty.
-
-