Skip to content

v5.0.0-alpha.20 | Forum channel support

Compare
Choose a tag to compare
@MinnDevelopment MinnDevelopment released this 21 Sep 13:59
· 278 commits to master since this release
1f6fca2

Overview

Discord is currently rolling out forums to all community guilds. This release adds support for these channels in JDA.

Forum support (#2184)

To use a forum channel, you must create a forum post. Posts are simply public ThreadChannels with a starter message. To create a post, instead of using the usual createThreadChannel, you must use createForumPost:

forum.createForumPost("Post Title Here", new MessageCreateBuilder()
  .addContent("# Header\n")
  .addContent("This is my first forum post!")
  .build()
).queue(post -> {
  Message message = post.getMessage();
  ThreadChannel thread = post.getThreadChannel();
  thread.sendMessage("Followup message").queue();
});

To create such a post, the bot must have Permission.MESSAGE_SEND in the forum channel. The client refers to this permission as Create Posts.

AudioChannel improvements (#2252)

As of this release, AudioChannel extends StandardGuildChannel instead of GuildChannel. This allows for a lot more features directly on the abstract interface, rather than having to cast down to voice or stage channels.

  • Invites
  • Category getter
  • Permissions
  • Positions
  • Copying

New Features

Changes

Full Changelog: v5.0.0-alpha.19...v5.0.0-alpha.20

Installation

Gradle

repositories {
    mavenCentral()
}
dependencies {
    implementation("net.dv8tion:JDA:5.0.0-alpha.20")
}

Maven

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>5.0.0-alpha.20</version> 
</dependency>