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

时间:2019-01-29 10:06:48

标签: python discord.py

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

帮助

2 个答案:

答案 0 :(得分:0)

from django.contrib.auth.models import AbstractUser

答案 1 :(得分:0)

async def msg(ctx,userid:str,*,msg):
       user = ctx.message.server.get_member(userid) or user = client.get_member(userid)
       await client.send_message(user,msg)

希望这对您有帮助!。

相关问题