Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/main/java/com/fopost/sdk/model/DiscordChannel.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,12 @@
*
* <p>{@code type} is Discord's channel type: 0 text, 5 announcement, 15 forum.
*/
public record DiscordChannel(String id, String name, int type, String parentId, boolean nsfw, boolean isCurrent) {}
public record DiscordChannel(
String id,
String name,
int type,
String parentId,
boolean nsfw,
/** False when a channel permission in Discord shuts the bot out. */
boolean canPost,
boolean isCurrent) {}
2 changes: 1 addition & 1 deletion src/test/java/com/fopost/sdk/DiscordTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DiscordTest {
void listChannelsAndSwitchTheCurrentOne() {
FakeTransport transport = new FakeTransport()
.enqueue(200, """
{"data":[{"id":"c2","name":"launches","type":0,"parent_id":null,"nsfw":false,"is_current":true}]}""")
{"data":[{"id":"c2","name":"launches","type":0,"parent_id":null,"nsfw":false,"can_post":true,"is_current":true}]}""")
.enqueue(200, "{\"data\":{\"id\":\"c2\",\"name\":\"launches\",\"is_current\":true}}");
FoPost client = TestSupport.client(transport);

Expand Down
Loading