Coder Social home page Coder Social logo

barryspacezero / telegram-gameinfobot Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 3.0 116 KB

A simple telegram bot written in Python which fetches game info from the IGDB API

Home Page: https://t.me/TheGameInfoBot

License: MIT License

Python 99.40% Dockerfile 0.60%
bot game-info game-information steam telegram telegram-bot itch-io itchio

telegram-gameinfobot's Introduction

Telegram-GameInfoBot

Python Version Pyrogram Version

A Telegram bot that provides information about games using the IGDB API.

Features

  • Game search: Users can search for games by name and get detailed information about the game, including release date, genres, platforms, rating, and more.
  • Character information: Users can retrieve information about a specific character, including name, description, gender, species, and additional details.
  • Screenshots: Users can request screenshots of a specific game to get a visual preview.
  • Artworks: Users can request artworks of a game to explore the visual elements.
  • Top-rated games: Users can get a list of the top-rated games based on ratings and popularity.

How to Use

  1. Start the bot by searching for "@TheGameInfoBot" on Telegram or by clicking here.
  2. Use the following commands to interact with the bot:
    • /start: Displays a welcome message and provides basic information about the bot.
    • /help: Provides a list of available commands and their usage instructions.
    • /game <game name>: Retrieves detailed information about a specific game.
    • /character <character name>: Retrieves information about a specific character.
    • /ss <game name>: Sends a screenshot of a specific game.
    • /art <game name>: Sends an artwork of a specific game.
    • /top: Retrieves a list of the top-rated games.

Development

To set up the development environment and run the bot locally, follow these steps:

  1. Clone the repository: git clone https://github.com/your-username/igdb-telegram-bot.git

  2. Install the required dependencies:

cd igdb-telegram-bot
pip install -r requirements.txt
  1. Obtain the necessary credentials:
  • Register and create an application on the Twitch Dev Console to obtain the Client ID and secret credentials.
  • Make a POST request to https://id.twitch.tv/oauth2/token with the following query string parameters, substituting your Client ID and Client Secret accordingly to get the Auth token. client_id=Client ID client_secret=Client Secret grant_type=client_credentials
  • Create a new Telegram bot and obtain the bot token.
  1. Set up the environment variables:
  • Create a .env file in the project root directory.
  • Add the following environment variables to the file:
    CLIENT_ID=your_igdb_client_id
    CLIENT_TOKEN=your_igdb_client_token
    API_ID=your_telegram_api_id
    API_HASH=your_telegram_api_hash
    BOT_TOKEN=your_telegram_bot_token
    REDIS_PASSWORD=password
    REDIS_PORT=port
    REDIS_HOST=host
    
  1. Run the bot:
python bot.py

Try the Game Info Bot now!

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Credits

@barryspace @EverythingSuckz @Qewertyy

telegram-gameinfobot's People

Contributors

barryspacezero avatar ishikki-akabane avatar qewertyy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

telegram-gameinfobot's Issues

Add Button Pagination for Search option & Screenshot and Artwork features as well.

When we search for a game, it shows the topmost result from IGDB, and so if we search for games having similar names, such as "THE FINALS" it might show the results for "FINAL FANTASY", to prevent this, we need to implement button pagination like a dropdown menu in the search feature as well as for scrolling through different Game Screenshots and Artworks.

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.