用户登录
用户注册

分享至

Discord.py - 如何使用此人的 ID 向某人发送私人消息?

  • 作者: 万人齐跪大喊晨哥万岁
  • 来源: 51数据库
  • 2023-02-01

问题描述

我想知道如何向具有他们 ID 的人发送私人消息

I would like to know how do I send private messages to someone with they'r ID

帮助

推荐答案

@client.command(pass_context=True)
async def dm(ctx):
    user=await client.get_user_info("User's ID here")
    await client.send_message(user, "Your message goes here")
    # This works ^
软件
前端设计
程序设计
Java相关