diff --git a/telegrambot.py b/telegrambot.py index 0f13ddf3..67fb6d54 100644 --- a/telegrambot.py +++ b/telegrambot.py @@ -10,6 +10,8 @@ from discord import Status as DiscordStatus # Init the config reader import configparser + + = u.idle() config = configparser.ConfigParser() config.read("config.ini") @@ -127,4 +129,3 @@ def process(arg_discord_connection): u.dispatcher.add_handler(CommandHandler("discord", cmd_discord)) u.dispatcher.add_handler(CommandHandler("cast", cmd_cast)) u.start_polling() - u.idle() \ No newline at end of file diff --git a/templates/leaderboards.html b/templates/leaderboards.html index d8a34bd2..215a0ef0 100644 --- a/templates/leaderboards.html +++ b/templates/leaderboards.html @@ -11,214 +11,227 @@

- Dota 2 + Royal Games Leaderboards

- - - - - - - - - - - - {% for record in dota_data %} +
+

+ Dota 2 +

+
RoyalSteamWinsSolo MMRParty MMR
+ - - - - - + + + + + - {% endfor %} - -
{{ record.steam.royal.username }} {{ record.steam.persona_name }}{{ record.wins }}{{ record.solo_mmr if record.solo_mmr is not none}}{{ record.party_mmr if record.party_mmr is not none}}RoyalSteamWinsSolo MMRParty MMR
-

- Rocket League -

- - - - - - - - - - - - - {% for record in rl_data %} + + + {% for record in dota_data %} + + + + + + + + {% endfor %} + +
RoyalSteamSingolo 1v1Doppio 2v2Standard 3v3Solo Standard SoloQ
{{ record.steam.royal.username }} {{ record.steam.persona_name }}{{ record.wins }}{{ record.solo_mmr if record.solo_mmr is not none}}{{ record.party_mmr if record.party_mmr is not none}}
+
+
+

+ Rocket League +

+ + - - - - - - + + + + + + - {% endfor %} - -
{{ record.steam.royal.username }} {{ record.steam.persona_name }} - {% if record.single_rank is not none %} - -
-
{{ record.single_mmr }}
-
Div {{ record.single_div + 1 }}
-
- {% elif record.single_mmr is not none %} - -
-
{{ record.single_mmr }}
-
Inattivo
-
- {% endif %} -
- {% if record.doubles_rank is not none %} - -
-
{{ record.doubles_mmr }}
-
Div {{ record.doubles_div + 1 }}
-
- {% elif record.doubles_mmr is not none %} - -
-
{{ record.doubles_mmr }}
-
Inattivo
-
- {% endif %} -
- {% if record.standard_rank is not none %} - -
-
{{ record.standard_mmr }}
-
Div {{ record.standard_div + 1 }}
-
- {% elif record.standard_mmr is not none %} - -
-
{{ record.standard_mmr }}
-
Inattivo
-
- {% endif %} -
- {% if record.solo_std_rank is not none %} - -
-
{{ record.solo_std_mmr }}
-
Div {{ record.solo_std_div + 1 }}
-
- {% elif record.solo_std_mmr is not none %} - -
-
{{ record.solo_std_mmr }}
-
Inattivo
-
- {% endif %} -
RoyalSteamSingolo 1v1Doppio 2v2Standard 3v3Solo Standard SoloQ
-

- Overwatch -

- - - - - - - - - - - {% for record in ow_data %} + + + {% for record in rl_data %} + + + + + + + + + {% endfor %} + +
RoyalBattletagLivelloRank
{{ record.steam.royal.username }} {{ record.steam.persona_name }} + {% if record.single_rank is not none %} + +
+
{{ record.single_mmr }}
+
Div {{ record.single_div + 1 }}
+
+ {% elif record.single_mmr is not none %} + +
+
{{ record.single_mmr }}
+
Inattivo
+
+ {% endif %} +
+ {% if record.doubles_rank is not none %} + +
+
{{ record.doubles_mmr }}
+
Div {{ record.doubles_div + 1 }}
+
+ {% elif record.doubles_mmr is not none %} + +
+
{{ record.doubles_mmr }}
+
Inattivo
+
+ {% endif %} +
+ {% if record.standard_rank is not none %} + +
+
{{ record.standard_mmr }}
+
Div {{ record.standard_div + 1 }}
+
+ {% elif record.standard_mmr is not none %} + +
+
{{ record.standard_mmr }}
+
Inattivo
+
+ {% endif %} +
+ {% if record.solo_std_rank is not none %} + +
+
{{ record.solo_std_mmr }}
+
Div {{ record.solo_std_div + 1 }}
+
+ {% elif record.solo_std_mmr is not none %} + +
+
{{ record.solo_std_mmr }}
+
Inattivo
+
+ {% endif %} +
+
+
+

+ Overwatch +

+ + - - - - + + + + + + + {% for record in ow_data %} + + + + + + + {% endfor %} + +
{{ record.royal.username }} {{ record }}{{ record.level }} - {% if record.rank is not none %} - - {{ record.rank }} + RoyalBattletagLivelloRank
{{ record.royal.username }} {{ record }}{{ record.level }} + {% if record.rank is not none %} + + {{ record.rank }} + {% endif %} +
+
+
+

+ Osu! +

+ + + + + + + + + + + + + {% for record in osu_data %} + + + + + + + + + {% endfor %} + +
RoyalUsernameosu!osu!taikoosu!catchosu!mania
{{ record.royal.username }} {{ record.osu_name }}{{ record.std_pp|round(0, "floor")|int if record.std_pp is not none and record.std_pp >= 1 }}{{ record.taiko_pp|round(0, "floor")|int if record.taiko_pp is not none and record.taiko_pp >= 1 }}{{ record.catch_pp|round(0, "floor")|int if record.catch_pp is not none and record.catch_pp >= 1 }}{{ record.mania_pp|round(0, "floor")|int if record.mania_pp is not none and record.mania_pp >= 1 }}
+
+
+

+ League of Legends +

+ + + + + + + + + + + + + {% for record in lol_data %} + + + + + {% if record.solo_division is not none %} + + {% else %} + {% endif %} - - - {% endfor %} - -
RoyalSummonerLivelloSolo SRFlex SRFlex TT
{{ record.royal.username }} {{ record.summoner_name }}{{ record.level }} {{ record.solo_division.name|capitalize }} {{ record.solo_rank.name }}
-

- Osu! -

- - - - - - - - - - - - - {% for record in osu_data %} - - - - - - - - - {% endfor %} - -
RoyalUsernameosu!osu!taikoosu!catchosu!mania
{{ record.royal.username }} {{ record.osu_name }}{{ record.std_pp|round(0, "floor")|int if record.std_pp is not none and record.std_pp >= 1 }}{{ record.taiko_pp|round(0, "floor")|int if record.taiko_pp is not none and record.taiko_pp >= 1 }}{{ record.catch_pp|round(0, "floor")|int if record.catch_pp is not none and record.catch_pp >= 1 }}{{ record.mania_pp|round(0, "floor")|int if record.mania_pp is not none and record.mania_pp >= 1 }}
-

- League of Legends -

- - - - - - - - - - - - - {% for record in lol_data %} - - - - - {% if record.solo_division is not none %} - - {% else %} - - {% endif %} - {% if record.flex_division is not none %} - - {% else %} - - {% endif %} - {% if record.twtr_division is not none %} - - {% else %} - - {% endif %} - - {% endfor %} - -
RoyalSummonerLivelloSolo SRFlex SRFlex TT
{{ record.royal.username }} {{ record.summoner_name }}{{ record.level }} {{ record.solo_division.name|capitalize }} {{ record.solo_rank.name }} {{ record.flex_division.name|capitalize }} {{ record.flex_rank.name }} {{ record.twtr_division.name|capitalize }} {{ record.twtr_rank.name }}
+ {% if record.flex_division is not none %} + {{ record.flex_division.name|capitalize }} {{ record.flex_rank.name }} + {% else %} + + {% endif %} + {% if record.twtr_division is not none %} + {{ record.twtr_division.name|capitalize }} {{ record.twtr_rank.name }} + {% else %} + + {% endif %} + + {% endfor %} + + +
\ No newline at end of file diff --git a/webserver.py b/webserver.py index fbd6b586..272faa85 100644 --- a/webserver.py +++ b/webserver.py @@ -1,7 +1,6 @@ from flask import Flask, render_template from db import Session, Royal, Steam, RocketLeague, Dota, Osu, Overwatch, LeagueOfLegends from sqlalchemy.orm import joinedload -from sqlalchemy import func app = Flask(__name__)