1 | import { WebClient } from "https://deno.land/x/slack_web_api@1.0.3/mod.ts"; |
2 |
|
3 | type Slack = { |
4 | token: string; |
5 | }; |
6 | export async function main( |
7 | slack_auth: Slack, |
8 | channel: string = undefined, |
9 | timestamp: string = undefined, |
10 | file: string = undefined |
11 | ) { |
12 | const web = new WebClient(slack_auth.token); |
13 |
|
14 | let response = await web.stars.add({ |
15 | channel: channel, |
16 | timestamp: timestamp, |
17 | file: file, |
18 | }); |
19 |
|
20 | return { response: response }; |
21 | } |
22 |
|