Wyślij DM Discord Py
channel = await member.create_dm()
await channel.send("hi this is a dear message")
Itchy Ibex
channel = await member.create_dm()
await channel.send("hi this is a dear message")
await user.send("hi this is a dear message")
@client.command()
async def dm(ctx, user: discord.User, *, reason = None)
await ctx.send(f"I'm messaging {user.mention}!")
await user.send({reason})
# sends a DM to the user
@client.event
async def on_message(message):
msg = message.content
if msg.startswith('Hello!'):
await message.author.send("Well hello there!")