samedi 19 mars 2022

how do I write a random user who is on the server to the "user" variable?

I need to write the name of a random user on the server to a variable.

this is about how I present this code:

import discord
from discord.ext import commands
import random

@client.command()
async def hi(ctx):

    user = discord.utils.get(ctx.guild.members, name = random)

    await ctx.send(user + ' hi!')



Aucun commentaire:

Enregistrer un commentaire