import * as wmill from "https://deno.land/x/windmill@v1.12.0/index.ts";
import { WebClient } from "https://deno.land/x/slack_web_api@1.0.3/mod.ts";
/*
@param: {string} channel - encoded team id to list users in, required if org token is used.
@param: {boolean} include_locale - Set this to true to receive the locale for users. Defaults to false
@param: {number} limit - The maximum number of items to return.
*/
export async function main(
slack_auth: wmill.Resource<"slack">,
team_id: string,
include_locale: boolean = false,
limit: number = 0,
) {
const web = new WebClient(slack_auth);
let response = await web.users.list({
team_id: team_id,
include_locale: include_locale,
limit: limit,
});
return { "response": response };
}
Submitted by rossmccrann 885 days ago
import * as wmill from "https://deno.land/x/windmill@v1.12.0/index.ts";
import { WebClient } from "https://deno.land/x/slack_web_api@1.0.3/mod.ts";
/*
@param: {string} channel - encoded team id to list users in, required if org token is used.
@param: {boolean} include_locale - Set this to true to receive the locale for users. Defaults to false
@param: {number} limit - The maximum number of items to return.
*/
export async function main(
team_id: string,
include_locale: boolean = false,
limit: number = 0,
) {
const web = new WebClient(slack_token);
let response = await web.users.list({
team_id: team_id,
include_locale: include_locale,
limit: limit,
});
return { "response": response };
}
Submitted by rossmccrann 885 days ago