Discord.py,客户端。获取所有成员()无效

Discord.py,客户端。获取所有成员()无效,discord.py,Discord.py,这段代码以前给了我服务器的成员,允许我为成员创建DM,但几天前它停止工作,现在只打印bot名称。这是几周前更改的。查看意图 import discord from discord.ext import commands import asyncio import time client= commands.Bot(command_prefix= '.') @client.event async def on_ready(): for a in client.get_all_membe

这段代码以前给了我服务器的成员,允许我为成员创建DM,但几天前它停止工作,现在只打印bot名称。

这是几周前更改的。查看
意图

import discord
from discord.ext import commands
import asyncio
import time

client= commands.Bot(command_prefix= '.')
@client.event
async def on_ready():
    for a in client.get_all_members():
        time.sleep(1)
        print(a)