개발자가 동료의 업무효율을 높이는 방법 | 슬랙봇 개념부터 개발까지

개발자가 동료의 업무효율을 높이는 방법 | 슬랙봇 개념부터 개발까지

2024년 5월 7일 에어프레미아 내부 기술세션에서 발표한 슬랙봇 발표입니다.

슬랙봇이 무엇인지 기초 개념 설명부터 만드는 방법 코드까지 빠르게 살펴봅니다.

Seungmin 마량

May 07, 2024

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

103 slides
  1. Slack Client ҳࢿ import { WebClient } from "@slack/web-api"; this.slackClient

    = new WebClient(process.env.SLACK_BOT_TOKEN); const app = await NestFactory.create(AppModule); await app.listen(3000); জোѾ
  2. Nest ࢲߡ द੘ import { WebClient } from "@slack/web-api"; this.slackClient

    = new WebClient(process.env.SLACK_BOT_TOKEN); const app = await NestFactory.create(AppModule); await app.listen(3000); ࢲߡद੘
  3. Slack Event ߉ӝ @Get("/") getHello(): string { return this.slackService.getHello(); }

    /FTUী 서 $POUSPMMFSࢸ੿ 4MBDLী 서 63-ഐ୹ 4%,ӝמ੉ইפ׮
  4. async postMessage(channelName: string, message: string) { const channelId = await

    this.getChannelIdByName(channelName); if (channelId) { this.slackClient.chat.postMessage({ channel: channelId, text: message, }); } } Slack Event ࠁղӝ ݫद૑੹࣠
  5. Slack Event ߉ӝ @Get("/") getHello(): string { return this.slackService.getHello(); }

    /FTUী 서 $POUSPMMFSࢸ੿ 4MBDLী 서 63-ഐ୹
  6. ৻ࠗ ࢲ࠺झ Event ߉ӝ @Get("/") getHello(): string { return this.slackService.getHello();

    } /FTUী 서 $POUSPMMFSࢸ੿ 4MBDLী 서 63-ഐ୹ ৻ࠗ 서 ࠺झ
  7. async postMessage(channelName: string, message: string) { const channelId = await

    this.getChannelIdByName(channelName); if (channelId) { this.slackClient.chat.postMessage({ channel: channelId, text: message, }); } } Slack Event ࠁղӝ ݫद૑੹࣠
  8. ӂೠ async postMessage(channelName: string, message: string) { const channelId =

    await this.getChannelIdByName(channelName); if (channelId) { this.slackClient.chat.postMessage({ channel: channelId, text: message, }); } } ز੘ೞ૑ঋח׮ ష௾ীӂೠ੉হ׮
  9. Slack Event ߉ӝ @Get("/") getHello(): string { return this.slackService.getHello(); }

    /FTUী 서 $POUSPMMFSࢸ੿ 4MBDLী 서 63-ഐ୹
  10. ࠈ ഝਊ ৘द 3 "QQ 4'0࠺೯଻ 널 ࢤࢿ " #

    $ઑઙࢎ৬% & 'थޖਗୡ؀ ठۑࠈࢲߡ

More Decks by Seungmin 마량

Other Decks in Programming