()
| 112 | } |
| 113 | |
| 114 | async function testForumThread() { |
| 115 | let { thread: channel, message } = await Discord.createForumThread({ |
| 116 | channelId: testForumId, |
| 117 | message: { content: "test thread" }, |
| 118 | name: "int-test-forum-thread", |
| 119 | autoArchiveDurationMinutes: 60, |
| 120 | }) |
| 121 | |
| 122 | assertExpected("PublicThread", channel.kind) |
| 123 | assertExpected(60, channel.threadMetadata.autoArchiveDurationMinutes) |
| 124 | assertExpected("int-test-forum-thread", channel.name) |
| 125 | |
| 126 | // check if it appears in the active threads list |
| 127 | const activeThreads = await Discord.getActiveThreads() |
| 128 | const found = activeThreads.threads.find(v => v.id === channel.id) |
| 129 | assertExpected(true, Boolean(found)) |
| 130 | |
| 131 | channel = await channel.archive() |
| 132 | assertExpected(true, channel.threadMetadata.archived) |
| 133 | } |
no test coverage detected