import { WebClient } from "@slack/web-api"
/**
* Invite Users to Channel
* Invite up to 100 users, by user ID, to a channel the token's user or app is in. Requires channels:write.invites on the connection (or channels:manage for a bot token, channels:write for a user token); private channels need groups:write.invites.
*/
export async function main(auth: RT.Slack, channel: string, users: string[]) {
const client = new WebClient(auth.token)
return await client.conversations.invite({ channel, users: users.join(",") })
}
Submitted by hugo989 2 hours ago