我正在用 discord.py 制作一个不和谐的机器人,当用户使用特定命令时,我想要一个特定的用户。
from discord import DMChannel
client = discord.Client()
client = commands.Bot(command_prefix=']')
@client.command(name='dmsend', pass_context=True)
async def dmsend(ctx, user_id):
user = await client.fetch_user("71123221123")
await DMChannel.send(user, "Put the message here")
当我发出命令]dmsend时,什么也没有发生。而且我也尝试过dmsend。但是什么也没发生。