diff --git a/src/cogs/teams.py b/src/cogs/teams.py index 8891793..52ed001 100644 --- a/src/cogs/teams.py +++ b/src/cogs/teams.py @@ -89,9 +89,14 @@ class TeamsCog(Cog, name="Teams"): reason="Creation of a new team", ) tournoi = get(guild.roles, name=team.tournoi) + participant = get(guild.roles, name=Role.PARTICIPANT) await ctx.author.add_roles( - team_role, captain_role, tournoi, reason="Creation of team " + trigram + team_role, + captain_role, + tournoi, + participant, + reason="Creation of team " + trigram, ) await ctx.send( @@ -131,10 +136,12 @@ class TeamsCog(Cog, name="Teams"): else: the_team = author_teams[0] tournoi = get(ctx.guild.roles, name=the_team[0].tournoi) + participant = get(ctx.guild.roles, name=Role.PARTICIPANT) await member.add_roles( the_team[1], tournoi, + participant, reason=f"{ctx.author.name} l'a ajouté à son équipe", ) await ctx.send( diff --git a/src/cogs/tirage_logic.py b/src/cogs/tirage_logic.py index f290d35..3de1836 100644 --- a/src/cogs/tirage_logic.py +++ b/src/cogs/tirage_logic.py @@ -163,15 +163,16 @@ class Tirage(yaml.YAMLObject): +-----+---------+---------+---------+---------+ | {0.name} | Déf | | Rap | Opp | +-----+---------+---------+---------+---------+ - | {0.name} | Opp | Déf | | Rap | + | {1.name} | Opp | Déf | | Rap | +-----+---------+---------+---------+---------+ - | {0.name} | Rap | Opp | Déf | | + | {2.name} | Rap | Opp | Déf | | +-----+---------+---------+---------+---------+ - | {0.name} | | Rap | Opp | Déf | + | {3.name} | | Rap | Opp | Déf | +-----+---------+---------+---------+---------+ ```""" Record = namedtuple("Record", ["name", "pb", "penalite"]) + await ctx.send(msg) for round in (0, 1): records = [ Record( @@ -182,12 +183,11 @@ class Tirage(yaml.YAMLObject): for team in in_passage_order(self.teams, round) ] - msg += f"\n\n**{ROUND_NAMES[round].capitalize()}**:\n" + msg = f"\n\n**{ROUND_NAMES[round].capitalize()}**:\n" msg += table.format(*records) + "\n" for team in self.teams: msg += team.details(round) - - await ctx.send(msg) + await ctx.send(msg) class Phase: @@ -287,7 +287,7 @@ class OrderPhase(Phase): if len(teams) > 1: re_do.extend(teams) - teams_str = ", ".join(team.role.mention for team in re_do) + teams_str = ", ".join(team.mention for team in re_do) await ctx.send( f"Les equipes {teams_str} ont fait le même résultat " "et doivent relancer un dé. " @@ -471,7 +471,7 @@ class TiragePhase(Phase): await asyncio.sleep(1.5) await ctx.send( - f"{self.current_team.mention} à toi l'honneur! " + f"{self.current_team.mention} à toi l'honneur ! " f"Lance `!random-problem` quand tu veux." ) diff --git a/src/cogs/tirages.py b/src/cogs/tirages.py index 690fda4..bd40483 100644 --- a/src/cogs/tirages.py +++ b/src/cogs/tirages.py @@ -87,7 +87,7 @@ class TirageCog(Cog, name="Tirages"): if channel in self.tirages: await self.tirages[channel].accept(ctx, False) else: - await ctx.send(f"{ctx.author.mention} nie tout en block !") + await ctx.send(f"{ctx.author.mention} nie tout en bloc !") # ---------- Commandes du groupe draw ----------- # diff --git a/src/constants.py b/src/constants.py index 75459ea..597cf6a 100644 --- a/src/constants.py +++ b/src/constants.py @@ -31,6 +31,7 @@ class Role: ORGA = "Orga" BENEVOLE = "Bénévole" CAPTAIN = "Capitaine" + PARTICIPANT = "Participant" ROUND_NAMES = ["premier tour", "deuxième tour"]