Code Monkey home page Code Monkey logo

startcamp's Introduction

로또 게임 및 결과 전송 챗봇 / 서버

이름 : 장재영

하는 일

로또 회차를 선택해서 지금 내가 고른 번호가 몇 등인지 알아보고, 결과를 텔레그램으로 보내줍니다. 수동으로 번호를 선택할 수도 있고 자동으로 번호를 뽑을 수도 있습니다.

작동

  • 홈 화면에서 크게 두 가지 버전의 게임을 할 수 있습니다. (수동 버전, 자동 버전)
  • 수동 버전에서는 회차와 번호 정보를 입력해야합니다.
    • 회차 정보는 1~837 까지의 정수를 받을 수 있도록 했고 필수 값으로 지정했습니다.
    • 번호 정보는 1~45 까지의 정수 6개를 받을 수 있도록 했고 필수 값으로 지정했습니다. 서로 중복되면 안되기 때문에 서버에서 걸러내도록 했습니다. 중복되면 사용자에게 알려줍니다.
  • 자동 버전에서는 회차 정보만 입력하면 됩니다.
  • 정보를 제대로 입력하고 제출 버튼을 누르면 서버에서 result.html 페이지로 보내줍니다.
  • result.html 페이지에서 로또 등수 결과를 알려줍니다. 그리고 텔레그램 ID값을 입력하면 로또 등수 결과를 메세지로 전송해줍니다. 제 ID값으로 실험했습니다.

어려웠던 점

  • 구현하고 싶은 것을 구글링하면 새롭고 모르는 게 또 나와서 오래걸렸다. flask doc을 틈틈히 읽어 봐야겠다.
  • 자바스크립트를 잘 알면 더 편할 것 같다. node.js가 인기 있는 이유를 조금이나마 알 것 같다.

앞으로 더 해볼 점

  • 자신의 텔레그램 ID값을 알고 있는 사람이 별로 없을 것이기 때문에 닉네임이나 휴대폰 번호 등 다른 것으로도 메세지를 보내는 방법을 알아보면 좋을 것 같다.
  • 텔레그램 API에 다른 함수들도 있을 텐데 완전 챗봇 형식으로 모바일에서도 구현할 수 있을 것 같다.

startcamp's People

Contributors

snowink1137 avatar

Watchers

James Cloos 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.