Thanks to visit codestin.com
Credit goes to github.com

Skip to content

This Python script is a Discord bot that integrates with the Riot Games API to fetch ranked information for a League of Legends player using their RiotID (game name and tag). The bot is built using Discord.py and allows users to retrieve their solo queue rank and win rate via a slash command in Discord.

Notifications You must be signed in to change notification settings

sngr0x0/rito_rank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RITO_RANK

Overview

This is a Discord bot that integrates with the Riot Games API to fetch ranked solo queue stats for League of Legends players. Users can retrieve their tier, rank, and win rate using a slash command in Discord by providing their RiotID (Game Name + Tag).

Features

  • Retrieves PUUID using RiotID (game name + tag).
  • Retrieves Summoner ID using PUUID.
  • Retrieves ranked solo queue stats (Tier, Rank, Winrate).
  • Implements a Discord slash command (/get_rank_stats).
  • Validates user input (name and tag length).
  • Sends a welcome message when a new member joins.
  • Includes a simple $say command to repeat text in uppercase.
  • Syncs slash commands automatically on bot startup.

Setup & Installation

1. Install Dependencies

Make sure you have Python 3.10+ installed. Then install the required dependencies:

pip install -r requirements.txt

2. Get API Keys

**3. Configure **config.json

Create a config.json file in the same directory as rito_rank_v6.py and add:

{
    "rito_token": "YOUR_RIOT_API_KEY",
    "disco_token": "YOUR_DISCORD_BOT_TOKEN"
}

4. Run the Bot

python rito_rank_v6.py

Usage

Slash Command: /get_rank_stats

  • Usage: /get_rank_stats region summoner_name tag
  • Example: /get_rank_stats Europe West Faker 123
  • Output:
    Faker#123 ranked stats:
    Rank: DIAMOND I
    Winrate: 57.89%
    

Text Command: $say

  • Usage: $say thanks for watching!
  • Output: THANKS FOR WATCHING!

Auto Welcome Message

  • When a new member joins, the bot sends:
    @User Welcome to the loli gang, homie ╰(*°▽°*)╯
    

Supported Regions

The following regions are supported in the dropdown menu:

  • North America (na1)
  • Middle East (me1)
  • Europe West (euw1)
  • Europe Nordic & East (eun1)
  • Oceania (oc1)
  • Korea (kr)
  • Japan (jp1)
  • Brazil (br1)
  • LAS (la2)
  • LAN (la1)
  • Russia (ru1)
  • Turkey (tr1)
  • Taiwan (tw2)
  • Vietnam (vn2)
  • Singapore (SG2)

Notes & Limitations

  • The bot uses discord.Intents.all() (not recommended for production).
  • Some summoners may not have ranked stats.
  • Only solo queue rank is fetched (not flex or TFT ranks).

Future Improvements

  • Add support for flex queue ranks.
  • Improve error handling for API failures.

License

This project is open-source and free to use.

About

This Python script is a Discord bot that integrates with the Riot Games API to fetch ranked information for a League of Legends player using their RiotID (game name and tag). The bot is built using Discord.py and allows users to retrieve their solo queue rank and win rate via a slash command in Discord.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages