Skip to content

Commit

Permalink
Fix JDA#retrieveWebhookById (#2319)
Browse files Browse the repository at this point in the history
  • Loading branch information
MinnDevelopment committed Nov 2, 2022
1 parent 040f0ab commit c61f76d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/net/dv8tion/jda/api/JDA.java
Expand Up @@ -1838,6 +1838,7 @@ default JDA setRequiredScopes(@Nonnull String... scopes)

/**
* Retrieves a {@link net.dv8tion.jda.api.entities.Webhook Webhook} by its id.
* <br>If the webhook does not belong to any known guild of this JDA session, it will be {@link Webhook#isPartial() partial}.
*
* <p>Possible {@link net.dv8tion.jda.api.requests.ErrorResponse ErrorResponses} caused by
* the returned {@link net.dv8tion.jda.api.requests.RestAction RestAction} include the following:
Expand Down Expand Up @@ -1867,6 +1868,7 @@ default JDA setRequiredScopes(@Nonnull String... scopes)

/**
* Retrieves a {@link net.dv8tion.jda.api.entities.Webhook Webhook} by its id.
* <br>If the webhook does not belong to any known guild of this JDA session, it will be {@link Webhook#isPartial() partial}.
*
* <p>Possible {@link net.dv8tion.jda.api.requests.ErrorResponse ErrorResponses} caused by
* the returned {@link net.dv8tion.jda.api.requests.RestAction RestAction} include the following:
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/dv8tion/jda/internal/JDAImpl.java
Expand Up @@ -1012,7 +1012,7 @@ public RestAction<Webhook> retrieveWebhookById(@Nonnull String webhookId)
{
DataObject object = response.getObject();
EntityBuilder builder = getEntityBuilder();
return builder.createWebhook(object);
return builder.createWebhook(object, true);
});
}

Expand Down

0 comments on commit c61f76d

Please sign in to comment.