( botId: string, token: string )
| 249 | }; |
| 250 | |
| 251 | export const getSlackBot = async ( |
| 252 | botId: string, |
| 253 | token: string |
| 254 | ): Promise<BotInfo> => { |
| 255 | const url = 'https://slack.com/api/bots.info?'; |
| 256 | |
| 257 | const response = await request |
| 258 | .get(url + 'bot=' + botId) |
| 259 | .set('Authorization', 'Bearer ' + token); |
| 260 | |
| 261 | return response.body.ok === true ? response.body.bot : {}; |
| 262 | }; |
no test coverage detected