mirror of
https://github.com/dizedev/Main-tech.git
synced 2026-09-16 21:58:48 +00:00
edit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import disnake
|
||||
from disnake.ext import commands
|
||||
|
||||
|
||||
class AvatarCommand(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
|
||||
@commands.slash_command()
|
||||
async def avatar(self, ctx: disnake.AppCommandInteraction, member: disnake.Member = None):
|
||||
if not member:
|
||||
member = ctx.author
|
||||
embed = disnake.Embed(title=f'Аватар пользователя: {member}', color=0x00ff00)
|
||||
embed.set_image(url=member.avatar.url)
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
|
||||
def setup(bot):
|
||||
bot.add_cog(AvatarCommand(bot))
|
||||
Reference in New Issue
Block a user