How can I use asynchronous parallelism with pycord in Python?
I wanna run the bot with client.run(token) and create several processes to send requests to API even when server is proceeding other request from my bot. I hope it's possible.
The code (should change colors really fast, beyond the limit of API with parallel requests to server):
@client.event
async def on_ready():
guild = client.get_guild(guild_id)
legend_role = guild.get_role(role_id)
async with amp.Pool(os.cpu_count()) as pool:
async for color in asyncgen_color_seq
await pool.apply(legend_role.edit, kwds={"colour": color})

