MCPcopy Create free account
hub / github.com/Botloader/botloader / testForumThread

Function testForumThread

integration-tests/threads.ts:114–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112}
113
114async 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}

Callers 1

threads.tsFile · 0.85

Calls 2

assertExpectedFunction · 0.90
createForumThreadMethod · 0.80

Tested by

no test coverage detected