import { WebClient } from "@slack/web-api"
/**
* Archive Channel
* Archive a channel. A bot token must be a member of the channel. Requires channels:manage (bot token) or channels:write (user token) on the connection; a private channel needs groups:write instead.
*/
export async function main(auth: RT.Slack, channel: string) {
const client = new WebClient(auth.token)
return await client.conversations.archive({ channel })
}
Submitted by hugo989 2 hours ago