Package discord4j.rest.entity
Class RestGuildTemplate
java.lang.Object
discord4j.rest.entity.RestGuildTemplate
Represents a guild template entity in Discord.
-
Method Summary
Modifier and TypeMethodDescriptionstatic RestGuildTemplatecreate(RestClient restClient, String code) Create aRestGuildTemplatewith the given code.Mono<discord4j.discordjson.json.GuildData>createGuild(discord4j.discordjson.json.TemplateCreateGuildRequest request) Create a new guild based on this template.booleangetCode()Gets the code of this template.Mono<discord4j.discordjson.json.TemplateData>getData()Retrieve this template's data upon subscription.inthashCode()
-
Method Details
-
create
Create aRestGuildTemplatewith the given code. This method does not perform any API request.- Parameters:
restClient- REST API resourcescode- the template's code- Returns:
- a
RestTemplaterepresented by the given code.
-
getCode
Gets the code of this template.- Returns:
- The code of this template
-
getData
Retrieve this template's data upon subscription.- Returns:
- a template object
-
createGuild
public Mono<discord4j.discordjson.json.GuildData> createGuild(discord4j.discordjson.json.TemplateCreateGuildRequest request) Create a new guild based on this template.This endpoint can be used only by bots in less than 10 guilds.
- Returns:
- a guild object
-
equals
-
hashCode
public int hashCode()
-