import { WebClient } from "@slack/web-api"
/**
* Set Channel Topic
* Set the topic of a channel the token's user or app is in. Plain text, up to 250 characters; an empty string clears it. Requires channels:write.topic on the connection (or channels:manage for a bot token, channels:write for a user token); private channels need groups:write.topic.
*/
export async function main(auth: RT.Slack, channel: string, topic: string) {
const client = new WebClient(auth.token)
return await client.conversations.setTopic({ channel, topic })
}
Submitted by hugo989 2 hours ago