if duration.endswith("d"):
time_converter = {"d": 86400, "h": 3600, "m": 60, "s": 1}
total_seconds = sum(int(duration[:-1]) * time_converter.get(duration[-1], 0) for duration in duration.split())
total_days = int(duration[:-1])
unmute_time = format_timedelta(datetime.timedelta(days=total_days), locale='ru_RU')
await member.add_roles(role)
embed2 = disnake.Embed(title="**Пользователь был замьючен!**", color=0xFFFFFF)
await inter.send(embed=embed2, ephemeral = True)
embed3 = disnake.Embed(title="**Вы были замьючены!**", color=0xFFFFFF)
embed3.add_field(name="**Модератором:**", value=f"{inter.user.mention}", inline=False)
embed3.add_field(name="**Время**:", value=f"**{unmute_time}**", inline=False)
embed3.add_field(name="**Причина:**", value=f"**{reason}**", inline=False)
embed3.set_thumbnail(url=inter.user.avatar.url)
await member.send(embed=embed3)
log_channel = await self.bot.fetch_channel(1215519557536718929)
embed5 = disnake.Embed(title="**Punish Log**", color=0xFFFFFF)
embed5.add_field(name="**Пользователь:**", value=f"{member.mention}", inline=False)
embed5.add_field(name="**Модератор:**", value=f"{inter.author.mention}", inline=False)
embed5.add_field(name="**Причина:**", value=f"**{reason}**", inline=False)
embed5.add_field(name="**Время:**", value=f"**{unmute_time}**", inline=False)
embed5.set_footer(text="Punishment was logged at " + str(datetime.datetime.now()))
embed5.set_thumbnail(url=member.avatar.url)
await log_channel.send(embed=embed5)
await asyncio.sleep(total_days * 86400)
await member.remove_roles(role)
embed4 = disnake.Embed(title="**Вы были размьючены!**", description="**Вы теперь снова можете разговаривать с другими пользователями!**", color=0xFFFFFF)
await member.send(embed=embed4)
log_channel2 = await self.bot.fetch_channel(1215519557536718929)
embed6 = disnake.Embed(title="**Freedom Log**", color=0xFFFFFF)
embed6.add_field(name="**Пользователь:**", value=f"{member.mention}", inline=False)
embed6.add_field(name="**Модератор:**", value=f"{inter.author.mention}" , inline=False)
embed6.set_footer(text="Freedom was logged at " + str(datetime.datetime.now()))
embed6.set_thumbnail(url=member.avatar.url)
await log_channel2.send(embed=embed6)
бот мутит на меньшее время хотя по идее должен на большее