🐛 fix tirages for finale
This commit is contained in:
parent
161478caf8
commit
fd000958a7
|
@ -13,6 +13,7 @@ import discord
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from src.constants import *
|
from src.constants import *
|
||||||
|
from src.utils import pprint_send
|
||||||
|
|
||||||
|
|
||||||
def skip_if(check, default=None):
|
def skip_if(check, default=None):
|
||||||
|
@ -280,7 +281,8 @@ class BaseTirage(yaml.YAMLObject):
|
||||||
i += 1
|
i += 1
|
||||||
# The conflicts
|
# The conflicts
|
||||||
order = doubles + order
|
order = doubles + order
|
||||||
self.poules[poule] = order
|
|
||||||
|
self.poules[poule] = [t.name for t in order]
|
||||||
|
|
||||||
await self.annonce_poule(poule)
|
await self.annonce_poule(poule)
|
||||||
|
|
||||||
|
|
|
@ -288,7 +288,7 @@ class DevCog(Cog, name="Dev tools"):
|
||||||
pprint(resp, out)
|
pprint(resp, out)
|
||||||
|
|
||||||
embed = discord.Embed(title="Result", color=discord.Colour.green())
|
embed = discord.Embed(title="Result", color=discord.Colour.green())
|
||||||
embed.add_field(name="Query", value=f"```py\n{full_query}```", inline=False)
|
embed.add_field(name="Query", value=f"```py\n{query}```", inline=False)
|
||||||
|
|
||||||
value = self.to_field_value(out)
|
value = self.to_field_value(out)
|
||||||
if resp is not None and value:
|
if resp is not None and value:
|
||||||
|
|
|
@ -279,8 +279,8 @@ class DiscordTirage(BaseTirage):
|
||||||
if len(teams) == 3:
|
if len(teams) == 3:
|
||||||
table = """```
|
table = """```
|
||||||
╔═════╦═════════╦═════════╦═════════╗
|
╔═════╦═════════╦═════════╦═════════╗
|
||||||
║ ║ Phase 1 ║ Phase 2 ║ Phase 3 ║
|
║ T F ║ Phase 1 ║ Phase 2 ║ Phase 3 ║
|
||||||
║ ║ Pb {0.pb} ║ Pb {1.pb} ║ Pb {2.pb} ║
|
║ J M ║ Pb {0.pb} ║ Pb {1.pb} ║ Pb {2.pb} ║
|
||||||
╠═════╬═════════╬═════════╬═════════╣
|
╠═════╬═════════╬═════════╬═════════╣
|
||||||
║ {0.name} ║ Def ║ Rap ║ Opp ║
|
║ {0.name} ║ Def ║ Rap ║ Opp ║
|
||||||
╠═════╬═════════╬═════════╬═════════╣
|
╠═════╬═════════╬═════════╬═════════╣
|
||||||
|
@ -292,7 +292,7 @@ class DiscordTirage(BaseTirage):
|
||||||
table = """```
|
table = """```
|
||||||
+-----+---------+---------+---------+---------+
|
+-----+---------+---------+---------+---------+
|
||||||
| | Phase 1 | Phase 2 | Phase 3 | Phase 4 |
|
| | Phase 1 | Phase 2 | Phase 3 | Phase 4 |
|
||||||
| | Pb {0.pb} | Pb {1.pb} | Pb {2.pb} | Pb {3.pb} |
|
| | Pb {0.pb} | Pb {1.pb} | Pb {2.pb} | Pb {3.pb} |
|
||||||
+-----+---------+---------+---------+---------+
|
+-----+---------+---------+---------+---------+
|
||||||
| {0.name} | Déf | | Rap | Opp |
|
| {0.name} | Déf | | Rap | Opp |
|
||||||
+-----+---------+---------+---------+---------+
|
+-----+---------+---------+---------+---------+
|
||||||
|
@ -304,22 +304,22 @@ class DiscordTirage(BaseTirage):
|
||||||
+-----+---------+---------+---------+---------+```"""
|
+-----+---------+---------+---------+---------+```"""
|
||||||
elif len(teams) == 5:
|
elif len(teams) == 5:
|
||||||
table = """```
|
table = """```
|
||||||
╔═════╦═══════════════════╦═══════════════════╦═════════╗
|
╔═══╦═══════════════════╦═══════════════════╦═════════╗
|
||||||
║ ║ Phase 1 ║ Phase 2 ║ Phase 3 ║
|
║ ║ Phase 1 ║ Phase 2 ║ Phase 3 ║
|
||||||
╠═════╬═════════╦═════════╬═════════╦═════════╬═════════╣
|
╠═══╬═════════╦═════════╬═════════╦═════════╬═════════╣
|
||||||
║ ║ Salle 1 ║ Salle 2 ║ Salle 1 ║ Salle 2 ║ Salle 1 ║
|
║ ║ Salle 1 ║ Salle 2 ║ Salle 1 ║ Salle 2 ║ Salle 1 ║
|
||||||
║ ║ Pb {0.pb} ║ Pb {1.pb} ║ Pb {2.pb} ║ Pb {3.pb} ║ Pb {4.pb} ║
|
║ ║ Pb. {0.pb} ║ Pb. {1.pb} ║ Pb. {2.pb} ║ Pb. {3.pb} ║ Pb. {4.pb} ║
|
||||||
╠═════╬═════════╬═════════╬═════════╬═════════╬═════════╣
|
╠═══╬═════════╬═════════╬═════════╬═════════╬═════════╣
|
||||||
║ {0.name} ║ Def ║ ║ Opp ║ Rap ║ ║
|
║{0.name}║ Def ║ ║ Opp ║ Rap ║ ║
|
||||||
╠═════╬═════════╬═════════╬═════════╬═════════╬═════════╣
|
╠═══╬═════════╬═════════╬═════════╬═════════╬═════════╣
|
||||||
║ {1.name} ║ ║ Def ║ Rap ║ ║ Opp ║
|
║{1.name}║ ║ Def ║ Rap ║ ║ Opp ║
|
||||||
╠═════╬═════════╬═════════╬═════════╬═════════╬═════════╣
|
╠═══╬═════════╬═════════╬═════════╬═════════╬═════════╣
|
||||||
║ {2.name} ║ Opp ║ ║ Def ║ ║ Rap ║
|
║{2.name}║ Opp ║ ║ Def ║ ║ Rap ║
|
||||||
╠═════╬═════════╬═════════╬═════════╬═════════╬═════════╣
|
╠═══╬═════════╬═════════╬═════════╬═════════╬═════════╣
|
||||||
║ {3.name} ║ Rap ║ Opp ║ ║ Def ║ ║
|
║{3.name}║ Rap ║ Opp ║ ║ Def ║ ║
|
||||||
╠═════╬═════════╬═════════╬═════════╬═════════╬═════════╣
|
╠═══╬═════════╬═════════╬═════════╬═════════╬═════════╣
|
||||||
║ {4.name} ║ ║ Rap ║ ║ Opp ║ Def ║
|
║{4.name}║ ║ Rap ║ ║ Opp ║ Def ║
|
||||||
╚═════╩═════════╩═════════╩═════════╩═════════╩═════════╝```"""
|
╚═══╩═════════╩═════════╩═════════╩═════════╩═════════╝```"""
|
||||||
else:
|
else:
|
||||||
table = "WTF il n'y a pas 3,4 ou 5 equipes ici."
|
table = "WTF il n'y a pas 3,4 ou 5 equipes ici."
|
||||||
|
|
||||||
|
@ -536,7 +536,8 @@ class TirageCog(Cog, name="Tirages"):
|
||||||
await ctx.send(f"Le problème tiré est... **{problem}**")
|
await ctx.send(f"Le problème tiré est... **{problem}**")
|
||||||
|
|
||||||
@commands.command(
|
@commands.command(
|
||||||
name="oui", aliases=["accept", "yes", "o", "oh-yeaaah", "accepte", "ouiiiiiii"],
|
name="oui",
|
||||||
|
aliases=["accept", "yes", "o", "oh-yeaaah", "accepte", "ouiiiiiii", "owi"],
|
||||||
)
|
)
|
||||||
async def accept_cmd(self, ctx):
|
async def accept_cmd(self, ctx):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue