GithubHelp home page GithubHelp logo

wed-study-bot's Introduction

자동 수요조사 봇

슬랙 챗봇으로 스터디 참석 인원을 수요조사 한 뒤 자동으로 스터디룸 예약을 해주는 프로그램

작동 방식

  • 정해진 시각에 슬랙 챗봇으로 "참석", "참석하지 않음" 버튼 2개가 있는 메세지를 발송
  • 슬랙 채널에 있는 사람들이 각각 버튼을 누르면 해당 투표 결과를 DB에 저장
  • 정해진 시각에 투표 결과를 바탕으로 스터디룸을 자동으로 예약해줌
  • 예약이 완료되면 예약에 사용된 전화번호로 문자 메세지가 옴

사용한 것들

  • Node.js
  • Slack API
  • SQLite
  • Puppeteer

개발 인원 및 소요기간

  • 1인 개발
  • 2019년 4월 ~ 2019년 6월

비슷한 프로그램을 만들고자 하는 사람을(미래의 나 포함) 위한 참고 사항

  • 유저가 챗봇의 메세지에 있는 버튼을 눌렀을 때 https로 POST요청이 날아오는데, 이것을 받을 수 있어야 한다. 여러 가지 방법이 있는데, wed-study-bot의 경우 treafik을 사용했음.
  • 만약 heroku를 이용할 생각이라면 주의해야 함. heroku에서 제공하는 서버는 일정 시간 동안 http 요청이 오지 않으면 sleep mode에 빠지게 됨. http 요청이 오면 sleep mode에서 깨어난다. slack이 제공하는 rtm api를 이용해서 챗봇을 만들고 heroku의 무료 플랜으로 배포할 경우 sleep mode에 한번 빠진 이후 다시 깨어나지 못할 수 있다. 유저가 특정 메세지를 보냈을 때 특정 행동을 하게 만들면 일어나기 쉬운 문제이다. rtm 클라이언트가 유저가 특정 메시지를 했다는 것을 알게 될 뿐이지 heroku 서버에 http 요청이 가는 것은 아니기 때문이다.
  • 웹사이트에 너무 짧은 시간 동안 많이 접속해서 어떤 행위를 하려고 하면 비정상적인 동작으로 간주되어 화면에 보이는 숫자를 입력해야한다거나 등 번거로운 일이 발생할 수 있다. 테스트를 할 때 주의하면 좋다.

wed-study-bot's People

Contributors

2kindsofcs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.