我正在尝试手动发送消息,而不等待用户发送消息。基本上,我希望能够在服务器端和邮件用户完成http请求时提醒用户
from discord.ext import commands
client = commands.Bot(command_prefix=".")
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
答案 0 :(得分:0)
您可以获取具有ID的用户并向他发送消息。示例:
@client.event
async def on_ready():
await client.get_user(USER_ID).send("Text Message")