Skip to content

Commit

Permalink
Return ThreadChannelAction instead of RestAction on Message#createThr…
Browse files Browse the repository at this point in the history
…eadChannel (#2171)
  • Loading branch information
Mitmocc committed Jul 7, 2022
1 parent a85ac50 commit a299aa5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main/java/net/dv8tion/jda/api/entities/Message.java
Expand Up @@ -40,6 +40,7 @@
import net.dv8tion.jda.api.requests.RestAction;
import net.dv8tion.jda.api.requests.restaction.AuditableRestAction;
import net.dv8tion.jda.api.requests.restaction.MessageAction;
import net.dv8tion.jda.api.requests.restaction.ThreadChannelAction;
import net.dv8tion.jda.api.requests.restaction.pagination.ReactionPaginationAction;
import net.dv8tion.jda.api.utils.AttachmentOption;
import net.dv8tion.jda.api.utils.AttachmentProxy;
Expand Down Expand Up @@ -2032,7 +2033,7 @@ default MessageAction reply(@Nonnull byte[] data, @Nonnull String name, @Nonnull

//TODO-v5: Docs
@CheckReturnValue
RestAction<ThreadChannel> createThreadChannel(String name);
ThreadChannelAction createThreadChannel(String name);

/**
* Mention constants, useful for use with {@link java.util.regex.Pattern Patterns}
Expand Down
Expand Up @@ -27,6 +27,7 @@
import net.dv8tion.jda.api.requests.RestAction;
import net.dv8tion.jda.api.requests.restaction.AuditableRestAction;
import net.dv8tion.jda.api.requests.restaction.MessageAction;
import net.dv8tion.jda.api.requests.restaction.ThreadChannelAction;
import net.dv8tion.jda.api.requests.restaction.pagination.ReactionPaginationAction;
import net.dv8tion.jda.internal.utils.Helpers;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -485,7 +486,7 @@ public Message.Interaction getInteraction()
}

@Override
public RestAction<ThreadChannel> createThreadChannel(String name)
public ThreadChannelAction createThreadChannel(String name)
{
unsupported();
return null;
Expand Down
Expand Up @@ -34,6 +34,7 @@
import net.dv8tion.jda.api.requests.RestAction;
import net.dv8tion.jda.api.requests.restaction.AuditableRestAction;
import net.dv8tion.jda.api.requests.restaction.MessageAction;
import net.dv8tion.jda.api.requests.restaction.ThreadChannelAction;
import net.dv8tion.jda.api.requests.restaction.pagination.ReactionPaginationAction;
import net.dv8tion.jda.api.utils.MarkdownSanitizer;
import net.dv8tion.jda.api.utils.data.DataObject;
Expand Down Expand Up @@ -646,7 +647,7 @@ public ThreadChannel getStartedThread()
}

@Override
public RestAction<ThreadChannel> createThreadChannel(String name)
public ThreadChannelAction createThreadChannel(String name)
{
return ((IThreadContainer) getGuildChannel()).createThreadChannel(name, this.getIdLong());
}
Expand Down

0 comments on commit a299aa5

Please sign in to comment.