📜  如何让 discord.py 重写 bot dm 某人 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:16.325000             🧑  作者: Mango

代码示例1
@bot.command()
async def pm(ctx):
    user_id_list = [1, 2, 3] # Replace this with list of IDs
    for user_id in user_id_list:
        user = await bot.get_user_info(user_id)
        await user.send('hello')