Ajout commande avatar
This commit is contained in:
parent
a0aa93724a
commit
8c07904e65
1 changed files with 13 additions and 0 deletions
|
@ -312,3 +312,16 @@ class Commands(commands.Cog):
|
||||||
async def _getid(self, ctx):
|
async def _getid(self, ctx):
|
||||||
await ctx.message.add_reaction(emoji = '✅')
|
await ctx.message.add_reaction(emoji = '✅')
|
||||||
return await ctx.send("Explication sur comment récuperer l'ID d'un utilisateur/salon : https://cdn.discordapp.com/attachments/640312926892195842/780802253258358834/GetID.mp4")
|
return await ctx.send("Explication sur comment récuperer l'ID d'un utilisateur/salon : https://cdn.discordapp.com/attachments/640312926892195842/780802253258358834/GetID.mp4")
|
||||||
|
|
||||||
|
@commands.command(name='avatar')
|
||||||
|
async def _avatar(self, ctx, *, user = '0'):
|
||||||
|
"""Affiche ton avatar ou celui que tu mentionnes.\n ➡ Syntaxe: .avatar [user]"""
|
||||||
|
if user == '0':
|
||||||
|
user = ctx.author
|
||||||
|
else:
|
||||||
|
user = self.bot.get_user(int(user[2:-1].replace("!","")))
|
||||||
|
await ctx.message.add_reaction(emoji = '✅')
|
||||||
|
embed = discord.Embed(description = f"[lien vers la photo de profil]({user.avatar_url}) de {user.mention}", color = randint(0, 0xFFFFFF))
|
||||||
|
embed.set_author(name = f"Photo de profil de {user.name}")
|
||||||
|
embed.set_image(url = user.avatar_url)
|
||||||
|
await ctx.send(embed = embed)
|
||||||
|
|
Reference in a new issue