convert avatar to a slash command and make it show a list of members
This commit is contained in:
parent
66a673379d
commit
316e6cdb5d
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user