Я пытаюсь создать принципиального бота на модерации и не могу занести название канала в журналы модерации. Я уже пробовал использовать ctx.channel, но, как я уже догадался, это бесполезно. Ты знаешь как это делать? Я недавно изучаю discord.py
Код:
@client.command()
@commands.has_permissions(ban_members=True)
async def slowmode(ctx, seconds: int, ):
embed = discord.Embed(
color=0xa61022
)
embed.set_author(
name=f'La modalità lenta durerà {seconds} secondi',
icon_url=f'{ctx.author.avatar_url}'
)
await ctx.send(embed=embed, delete_after=10.0)
await ctx.channel.edit(slowmode_delay=seconds)
channel_ability = ctx.channel
embed = discord.Embed(
color=0xFFD000
)
embed.set_author(
name=f'{ctx.author._user} ha settato ad {seconds} secondi la modalità lenta su {channel_ability}',
icon_url=f'{ctx.author.avatar_url}'
)
embed.set_footer(text=f'Secondi modalità lenta: {seconds}')
embed.add_field(
name='Settata da:',
value=f'{ctx.author._user}',
inline=True
)
embed.add_field(
name='Canale dove è stata settata la slowmode:',
value=f'{channel_ability}',
inline=True
)
channel = client.get_channel(729553772547932190)
await channel.send(embed=embed)