向所有好友发送消息Discord.py(用户令牌)



我该如何向所有朋友发送消息?我希望能够通过Discord.py库实现这一点,希望这里有人知道。请注意,我想使用我的代币访问我的朋友列表,这不是机器人。我这样做是因为我想自动化我的dms来回答一些日常问题。

我当前收到此错误:

TypeError: 'module' object is not callable

程序:

import discord
with open('TOKEN_TESTUSER.txt', 'r') as f:
TOKEN = f.readline()
client = discord.client()
@client.event
async def on_connect():
for user in client.user.friends:
try:
await user.send('Message')
print("Working")

except:
print("Not working")
client.run(TOKEN, bot=False)

我真的很感激你的回答。

Discord在迁移到2.0版本时删除了此功能。
您可以在此处看到更改列表。

不幸的是,我认为你再也不能用机器人给你的朋友发不和的信息了

最新更新