i'm a French Discord bot Developer bot I have an error on my background tasks:
@bot.event
async def on_ready():
print("prêt")
async def ch_pr():
await bot.wait_until_ready()
statuses = [
"0help ou 0?", f"Sur {len(bot.guilds)} serveurs !",
"Fait en discord.py !",
str(len(set(bot.get_all_members))) + "utilisateurs du bot!"
]
while not bot.is_closed():
status = random.choice(statuses)
await bot.change_presence(activity=discord.Game(name=status))
await asyncio.sleep(3)
My error is:
File main.py,line 38 in ch_pr:
str(len(set(bot.get_all_members))) + "utilisateurs du bot!"
TypeError: Name 'method' object is not iterable.
Thanks for help. I'm coding with repl.it