How to create a thread channel? #2632
Unanswered
epilepticseizureee
asked this question in
Questions and Help
Replies: 2 comments
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Hey! Here is a very easy solution for your problem. After a command has been issued, the bot will send a text message to the channel and create a thread onto this. You can of course choose other messages from members, but you will need a message to start a thread channel. @Override
public void onSlashCommandInteraction(SlashCommandInteractionEvent event) {
if(event.getName().equals("test")) {
Message message = event.getMessageChannel().sendMessage("Creating new Thread!").complete();
ThreadChannel threadChannel = message.createThreadChannel("Cool thread channel!").complete();
threadChannel.addThreadMember(event.getMember()).queue();
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question: how to create a thread in a text channel and interact with it (add users, etc.). I couldn't figure it out myself, so I'm waiting for your answer.
Beta Was this translation helpful? Give feedback.
All reactions