Giter VIP home page Giter VIP logo

on9wordchainbot's Introduction

On9 Word Chain Bot

On9 Word Chain Bot logo

(Epic icon by @AdriTheDreamer)

On9 Word Chain Bot hosts games of word chain in Telegram groups.

Statistics

  • 480k+ games
  • 180k+ players
  • 43k+ groups

Telegram Links

Roadmap

  • Module restructure
  • Add support for other languages in ClassicGame
  • i18n for text strings
  • /forcestart voting for non-admins

Installation

Requirements

Python 3.7+
PostgreSQL 11+
2 Telegram bots

It is highly recommended that you turn off privacy mode for On9 Word Chain Bot at @BotFather, which is on by default. With privacy mode on, the bot will not receive players' answers unless they reply to the bot.

Configuration

Create config.json in the format described in config_format.json.

Constants:

  • TOKEN*: A Telegram bot token.
  • ON9BOT_TOKEN*: Another Telegram bot token for virtual player bot. Can be the same as TOKEN.
  • DB_URI: A PostgresSQL database URI. (format) (Won't work with other databases, why did I write raw SQL)
  • PROVIDER_TOKEN*#: A Telegram payment provider token.
  • OWNER_ID: Telegram user id of the bot owner.
  • ADMIN_GROUP_ID^: Telegram group id of the bot admin group. Error messages and word requests are sent here.
  • OFFICIAL_GROUP_ID^: Telegram group id of the official group of the bot.
  • WORD_ADDITION_CHANNEL_ID^: Telegram channel id of the channel to announce word additions.
  • VIP: A list of Telegram user ids of VIPs.
  • VIP_GROUP: A list of Telegram group ids of VIP groups.

*: Obtained by contacting BotFather.
#: Optional if the payment commands are removed. Bot currently uses Stripe, other payment providers may not be supported.
^: Set them to the same throwaway group if you do not need related features.

Make sure all data is valid to prevent errors.

Table Creation

Create the required tables in your PostgreSQL database by running init.sql.

Deployment

Install dependencies with pip install -r requirements.txt.
Run python main.py.

on9wordchainbot's People

Contributors

jonowo avatar matesa 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.