[Custom API] League of Legends commands

Hi guys!

First of all, I would like to say that I am pretty hesitent to post this API here since Nightbot offers an $(leagueoflegends) variable. However, I find that only having the rank of one summoner (without the League Points or the current promotion series) wasn’t enough. So I developped an API to pull different stats from the Riot API . I created a website to better explain the API and have the people adding the commands themselves with the commands generator. The code of the website/API is available on Github and I would be happy to improve the code and add new features! You can test all these commands in my Twitch channel if you want so see how they react before adding it into yours.

Features of the website/api

  • Adding the commands directly into your Nightbot (needs to connect your Nighbot with the website)
  • Customization of the response of any commands (needs to connect your Twitch account with the website and the commands needs to be on that channel, might look to modify it since it’s popular)
  • Commands generator to create the code to copy and paste fast
  • Possibility to use champion abbreviation rather than full name (kog will be the same as kog’maw)
  • Statistics (we all love stats :slight_smile: )

I won’t display each and every commands as they are available on the Commands list page.

!rank

Gold V (86 LP) Series: ✓ X -

!lastgame

Last game won with Gragas 5/4/11 (4 KDA with 51.6% kill participation) 1 double kill

!mostplayed

  1. Tristana (93), 2. Lucian (30), 3. Gnar (24), 4. Caitlyn (23), 5. Corki (21)

!stats tristana

67.7% [63/30]. KDA: 9.6/5.2/7.7 1 pentakill!

!championPoints tristana

Champion level 6 with Tristana (94459 points - S+). Chest granted!

!winrate

Overall: 51.8% Top 5 : 1. Tristana (67.7%), 2. Corki (61.9%), 3. Thresh (50%), 4. Sivir (50%), 5. Lucian (46.7%)

I hope you’ll like these commands and I would appreciate any suggestions :smiley:

1 Like

Hey man. :slight_smile: Looks like this could be great, but when I try to connect it to Nightbot this is the error I get:

Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in /home/sitemeut/public_html/Projets/got_me/api/apiFunctions/functions.php on line 50

Warning: Cannot modify header information - headers already sent by (output started at /home/sitemeut/public_html/Projets/got_me/api/apiFunctions/functions.php:50) in /home/sitemeut/public_html/Projets/got_me/api/login.php on line 13

Picture: http://imgur.com/DNAM5oB

Sorry about that! It should now be fixed.

1 Like

@trahanqc you know the api has been changed and !rank etc aren’t working anymore.

@gg_recked Can you provide me the channel you tried it on? All my available commands are currently working

Hi man, there is a problem with the rank command. It returns unranked. Can you fix it? Ty

1 Like

Is this not up anymore? The website is not working for me - I want to get my LP and promo shown in chat - any alternatives?

1 Like

hello can someone help me, i need the command for !rank on league of legends the who shows lp
thanks