Discord.py-如何使用该人的ID向某人发送私人消息? [英] Discord.py - How do I send private message to someone using the person's Id?

查看:213
本文介绍了Discord.py-如何使用该人的ID向某人发送私人消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何发送私信给具有其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 ^

这篇关于Discord.py-如何使用该人的ID向某人发送私人消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆