diff --git a/src/cogs/dev.py b/src/cogs/dev.py index 6f8e874..564dc98 100644 --- a/src/cogs/dev.py +++ b/src/cogs/dev.py @@ -125,7 +125,7 @@ class DevCog(Cog, name="Dev tools"): await ctx.send(f":tada: L'extension **{name}** a bien été ajoutée !") # noinspection PyUnreachableCode - @command(name="setup", hidden=True) + @command(name="setup") @has_role(Role.DEV) async def setup_roles(self, ctx): """ @@ -187,7 +187,7 @@ class DevCog(Cog, name="Dev tools"): @command(name="send") @has_role(Role.DEV) async def send_cmd(self, ctx, *msg): - """Envoie un message.""" + """(dev) Envoie un message.""" await ctx.message.delete() await ctx.send(" ".join(msg)) diff --git a/src/cogs/misc.py b/src/cogs/misc.py index cc85ebf..a1400d2 100644 --- a/src/cogs/misc.py +++ b/src/cogs/misc.py @@ -398,7 +398,7 @@ class MiscCog(Cog, name="Divers"): with open(File.JOKES_V2, "w") as f: yaml.safe_dump_all(jokes, f) - @group(name="joke", invoke_without_command=True) + @group(name="joke", invoke_without_command=True, case_insensitive=True) async def joke(self, ctx: Context): m: discord.Message = ctx.message diff --git a/src/cogs/teams.py b/src/cogs/teams.py index 5b62055..81a1678 100644 --- a/src/cogs/teams.py +++ b/src/cogs/teams.py @@ -115,7 +115,7 @@ class TeamsCog(Cog, name="Teams"): return f"{ctx.author.mention} à été ajouté comme spectateur dans à {tournoi}." - @group(name="team", invoke_without_command=True) + @group(name="team", invoke_without_command=True, case_insensitive=True, hidden=True) async def team(self, ctx): """Groupe de commandes pour la gestion des équipes.""" diff --git a/src/cogs/tirages.py b/src/cogs/tirages.py index d5bb160..f915f4b 100644 --- a/src/cogs/tirages.py +++ b/src/cogs/tirages.py @@ -510,7 +510,7 @@ class TirageCog(Cog, name="Tirages"): @commands.command(name="dice-all", aliases=["da"]) @commands.has_role(Role.DEV) async def dice_all_cmd(self, ctx, *teams): - """Lance un dé pour chaque equipe afin de tester les tirages.""" + """(dev) Lance un dé pour chaque equipe afin de tester les tirages.""" channel = ctx.channel.id if channel in self.tirages: for t in teams: @@ -565,7 +565,13 @@ class TirageCog(Cog, name="Tirages"): # ---------- Commandes du groupe draw ----------- # - @group(name="draw", aliases=["d", "tirage"], invoke_without_command=True) + @group( + name="draw", + aliases=["d", "tirage"], + invoke_without_command=True, + case_insensitive=True, + hidden=True, + ) async def draw_group(self, ctx: Context) -> None: """Groupe de commandes pour les tirages.""" @@ -633,26 +639,6 @@ class TirageCog(Cog, name="Tirages"): else: await ctx.send("Il n'y a pas de tirage en cours.") - # - # @draw_group.command(name="skip", aliases=["s"]) - # @commands.has_role(Role.DEV) - # async def draw_skip(self, ctx, *teams: discord.Role): - # """(dev) Passe certaines phases du tirage.""" - # channel = ctx.channel.id - # self.tirages[channel] = tirage = Tirage(ctx, channel, teams) - # - # tirage.phase = TiragePhase(tirage, round=1) - # for i, team in enumerate(tirage.teams): - # team.tirage_order = [i + 1, i + 1] - # team.passage_order = [i + 1, i + 1] - # team.accepted_problems = [PROBLEMS[i], PROBLEMS[-i - 1]] - # tirage.teams[0].rejected = [{PROBLEMS[3]}, set(PROBLEMS[4:8])] - # tirage.teams[1].rejected = [{PROBLEMS[7]}, set()] - # - # await ctx.send(f"Skipping to {tirage.phase.__class__.__name__}.") - # await tirage.phase.start(ctx) - # await tirage.update_phase(ctx) - def get_tirages(self) -> Dict[int, BaseTirage]: return DiscordTirage.load_all() @@ -706,7 +692,7 @@ class TirageCog(Cog, name="Tirages"): @commands.has_role(Role.DEV) async def send_cmd(self, ctx, tirage_id: int, poule="A", round: int = 1): """ - Envoie les poules sur tfjm.org + (dev) Envoie les poules sur tfjm.org Exemple: `!draw send 42 B 1` - Envoie la poule B1 du tirage n°42. diff --git a/src/tfjm_discord_bot.py b/src/tfjm_discord_bot.py index 8379974..285ff03 100644 --- a/src/tfjm_discord_bot.py +++ b/src/tfjm_discord_bot.py @@ -15,7 +15,7 @@ tirages = {} def start(): - bot = CustomBot(("! ", "!")) + bot = CustomBot(("! ", "!"), case_insensitive=True) @bot.event async def on_ready():