convert avatar to a slash command and make it show a list of members

This commit is contained in:
Luke Robles 2022-10-17 17:42:50 -07:00
parent 66a673379d
commit 316e6cdb5d

View File

@ -1,3 +1,4 @@
from discord import option
from discord.ext import commands
import core_utils
import discord
@ -8,9 +9,10 @@ class Users(commands.Cog):
def __init__(self, bot):
self.bot: commands.Bot = bot
@commands.command(name="avatar")
@commands.slash_command(guild_ids=None, name="avatar")
@option("User", description="Choose a member", input_type="user")
async def avatar(self, ctx: commands.Context, user: discord.Member):
await ctx.reply(
await ctx.respond(
embed=core_utils.generate_embed(
embed_title="{}#{}".format(user.name, user.discriminator),
embed_url=user.avatar,