mirror of
				https://gitlab.com/ddorn/tfjm-discord-bot.git
				synced 2025-11-04 09:02:14 +01:00 
			
		
		
		
	🐛 hotfixes
This commit is contained in:
		@@ -72,6 +72,7 @@ class DevCog(Cog, name="Dev tools"):
 | 
			
		||||
            await ctx.send(f":tada: L'extension **{name}** a bien été rechargée.")
 | 
			
		||||
 | 
			
		||||
    @command(name="setup-roles")
 | 
			
		||||
    @has_role(Role.DEV)
 | 
			
		||||
    async def setup_roles(self, ctx):
 | 
			
		||||
        """
 | 
			
		||||
        (dev) Temporary command to setup the server.
 | 
			
		||||
 
 | 
			
		||||
@@ -159,12 +159,12 @@ class TeamsCog(Cog, name="Teams"):
 | 
			
		||||
                reason=f"{ctx.author.name} l'a ajouté à son équipe",
 | 
			
		||||
            )
 | 
			
		||||
            await ctx.send(
 | 
			
		||||
                f"{member.mention} à été ajouté dans l'équipe {the_team[1].mention}"
 | 
			
		||||
                f"{member.mention} a été ajouté dans l'équipe {the_team[1].mention}"
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
    @team.command(name="channel", ignore_extra=False)
 | 
			
		||||
    @team.command(name="channel")
 | 
			
		||||
    @commands.has_role(Role.CAPTAIN)
 | 
			
		||||
    async def team_channel(self, ctx, channel_name):
 | 
			
		||||
    async def team_channel(self, ctx, *channel_name):
 | 
			
		||||
        """
 | 
			
		||||
        (cap) Crée une channel privée pour l'équipe
 | 
			
		||||
 | 
			
		||||
@@ -175,6 +175,15 @@ class TeamsCog(Cog, name="Teams"):
 | 
			
		||||
            `!team channel un-nom-sympa`
 | 
			
		||||
        """
 | 
			
		||||
 | 
			
		||||
        if not channel_name:
 | 
			
		||||
            await ctx.send(
 | 
			
		||||
                "Tu dois mettre un nom d'équipe, par exemple "
 | 
			
		||||
                "`!team channel un-super-nom`"
 | 
			
		||||
            )
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
        channel_name = " ".join(channel_name)
 | 
			
		||||
 | 
			
		||||
        guild: discord.Guild = ctx.guild
 | 
			
		||||
        team_role = self.teams_for(ctx.author)[0][1]
 | 
			
		||||
        team_channel_category = get(guild.categories, name=TEAMS_CHANNEL_CATEGORY)
 | 
			
		||||
 
 | 
			
		||||
@@ -653,13 +653,13 @@ class TirageCog(Cog, name="Tirages"):
 | 
			
		||||
 | 
			
		||||
    # ---------- Commandes du groupe draw ----------- #
 | 
			
		||||
 | 
			
		||||
    @group(
 | 
			
		||||
        name="draw", aliases=["d", "tirage"],
 | 
			
		||||
    )
 | 
			
		||||
    @group(name="draw", aliases=["d", "tirage"], invoke_without_command=True)
 | 
			
		||||
    async def draw_group(self, ctx: Context) -> None:
 | 
			
		||||
        """Groupe de commandes pour les tirages. Détails: `!help draw`"""
 | 
			
		||||
 | 
			
		||||
        print("WTFF")
 | 
			
		||||
        help = self.bot.get_command("help")
 | 
			
		||||
        await help.callback(ctx, "draw")
 | 
			
		||||
        await ctx.send("wtf man")
 | 
			
		||||
 | 
			
		||||
    @draw_group.command(
 | 
			
		||||
        name="start", usage="équipe1 équipe2 équipe3 (équipe4)",
 | 
			
		||||
 
 | 
			
		||||
@@ -69,6 +69,8 @@ async def on_command_error(ctx: Context, error, *args, **kwargs):
 | 
			
		||||
        # 'Command "NAME" is not found'
 | 
			
		||||
        name = str(error).partition('"')[2].rpartition('"')[0]
 | 
			
		||||
        msg = f"La commande {name} n'éxiste pas. Pour un liste des commandes, envoie `!help`."
 | 
			
		||||
    elif isinstance(error, commands.MissingRole):
 | 
			
		||||
        msg = f"Il te faut le role de {error.missing_role} pour utiliser cette commande"
 | 
			
		||||
    else:
 | 
			
		||||
        msg = repr(error)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user