Coder Social home page Coder Social logo

shashanksingh1717 / telegramconversationgames Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luismayo/telegramconversationgames

0.0 0.0 0.0 137 KB

Conversational games for Telegram

License: GNU General Public License v3.0

TypeScript 100.00%

telegramconversationgames's Introduction

Build

TelegramConversationGamesBot

Telegram bot to play conversational games Currently only has wouldyourather, never have i ever, f*ck marry kill and press the button You can check it at @conversationGamesBot

Would you rather questions extracted from

Getting Started

Prerequisites

  • Node.js
  • A bot token. You can get one chatting with BotFather

Installing

Clone the repository

git clone https://github.com/LuisMayo/TelegramConversationGames.git

npm install into the cloned repo

npm i

Copy conf/conf-dummy.json into conf.json and fill the required settings.

Build the project tsc Start the project node build/index.js

Adding a new game

You can check this commit to know how to add games: https://github.com/LuisMayo/TelegramConversationGames/commit/616d8cf6ca32c6d2b573ac3906ac65683fc1191c

In short, you have to:

  • Create a class which implements GameObject, this includes the method sendMessage which serves to send a message in response to a command
  • Create a service which extends the abstract class GameService and implements several methods including getGameObject which returns a promise with when fullfilled returns the previously created class
  • Add the service to the service factory
  • Add the handler for the inline-button and the command in index.ts

Contributing

Since this is a tiny project we don't have strict rules about contributions. Just open a Pull Request to fix any of the project issues or any improvement you have percieved on your own. Any contributions which improve or fix the project will be accepted as long as they don't deviate too much from the project objectives. If you have doubts about whether the PR would be accepted or not you can open an issue before coding to ask for my opinion

telegramconversationgames's People

Contributors

dependabot[bot] avatar luismayo avatar lulzx 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.