@commands.command(name='test')
async def test (self, ctx, member:discord.Member):
wait ctx.send(embed=discord.Embed(title=f'{member} Details', description='Description')
*Note: This is how to write when using the command framework
Description:
·member: discord.Member makes it easy by adding a method called discordMember in advance to the argument
That's all ( )
In addition to this, member.avatar.url
gets the URL of the icon.
See API Reference for more information
@client.command()
async def userinfo(ctx, userid=None):
if userid==None:
userid=str(ctx.author.id)
try : user = wait client.fetch_user(userid)
exception: wait ctx.reply("No user is affected by the specified id.")
wait ctx.reply("username:" + user.name.replace("@", "@")))
© 2024 OneMinuteCode. All rights reserved.