@bot.command(aliases = ['рассылка',"р","ссылка"])
async def rassilka(ctx ):
if ctx.author.id == мой id:
embed = discord.Embed(title="",description=f"", colour=discord.Colour.blue())
embed.add_field(name=f"", value="", inline=True)
for guild in bot.guilds:
print(f"{guild} - not ready")
random_chan = guild.channels
chenel = random.choice(random_chan)
await chenel.send("Срочная инфа")
await chenel.send(embed =embed)
print(f"{guild} - ready")
Command raised an exception: AttributeError: 'CategoryChannel' object has no attribute 'send'
@bot.command(aliases = ['рассылка',"р","ссылка"])
async def rassilka(ctx ):
if ctx.author.id == мой id:
embed = discord.Embed(title="",description=f"", colour=discord.Colour.blue())
embed.add_field(name=f"", value="", inline=True)
for guild in bot.guilds:
print(f"{guild} - not ready")
random_chan = [ch for ch in guild.channels if ch.type == discord.ChannelType.text]
chenel = random.choice(random_chan)
await chenel.send("Срочная инфа")
await chenel.send(embed =embed)
print(f"{guild} - ready")