Code Monkey home page Code Monkey logo

telegram-conversational-games-bot's Introduction

๐Ÿค– Conversational Game Bot (for Telegram: Chat App)

A simple, conversational games bot for Telegram to help keep chats active and fun. Responses are stored locally in .txt files. The default database is SFW, though it's easy to add or remove responses by editing the text files found in the data folder.

Conversational games the bot has at the moment. You can get a list of commands by typing /help.

๐Ÿš€ Getting Started

Inviting

I'm not hosting any public instances of the bot right now, but I may in the future. Until then, you'll have to self-host it. Follow the steps down below to get started hosting the bot yourself.

Prerequisites

Installing

  1. Clone the repository. (I recommend making a virtual environment)
git clone https://github.com/posetack/telegram-conversational-games-bot.git
  1. Install the requirements.txt
python -m pip install -r requirements.txt
  1. Create a bot and grab the bot token by messaging @BotFather on Telegram.
  2. Open config.json and put the bot token in BOT_TOKEN.
  3. Run the project
python cgb.py

Adding new responses or editing them.

Responses are located at the data folder in text files where they're separated using newlines. Currently, local response databases exist only for Truth or Dare, Never Have I Ever, and This or That. Would You Rather and Press The Button works by requesting their websites to fetch questions. I do plan on also making a local database for both of these games just in case the request approach fails or stops working in the future.

๐Ÿค Contributing

Contributions are accepted and there really isn't any strict rules. Feel free to open a pull request to fix any issues or to make improvements you think that should be made. You can also add new games or new responses to the current local database. Any contribution will be accepted as long as it doesn't stray too much from the objective of the bot. If you're in doubt about whether the PR would be accepted or not, you can always open an issue to get my opinion on it.

To-Do

You can also help me with the current to-do list I have in mind (in no particular order).

  • Add command cooldowns.
  • Inline mode support.
  • Avoid repetition of the same response for the same person.
  • Larger database of questions.
  • Backup local database of questions for press the button and would you rather.
  • Ability to add custom responses per-group. (maybe)
  • Ability to request responses to be added to the main database (through a command).
  • NSFW Database of questions that show up only when explicitly enabled.

License

AGPLv3, see LICENSE

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.