V
V
v232 324422021-06-11 00:49:27
Python
v232 32442, 2021-06-11 00:49:27

How to make a discord bot write to a specific user?

60c288b10bab6370879716.png
it pops up when you type !test python I've been learning for more than a week, maybe I'm missing something and this is a very stupid question

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
UberPool, 2021-06-11
@qwerezedl32weiss

And also set the resolution

import discord
from discord.ext import commands

intents = discord.Intents.default()

intents.members = True

client = commands.Bot(command_prefix='!', intents=intents)


@client.command()
async def ping(ctx):
    user = client.get_user(id)
    await user.send('message')


client.run('token')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question