All checks were successful
Build and push / changes (push) Successful in 3s
Build and push / Lint-Python (push) Successful in 2s
Build and push / Build-and-Push-Docker (push) Successful in 2m51s
Build and push / sync-argocd-app (push) Successful in 2s
Build and push / post-status-to-discord (push) Successful in 2s
25 lines
709 B
Python
Executable File
25 lines
709 B
Python
Executable File
from discord import option
|
|
from discord.ext import commands
|
|
import core_utils
|
|
import discord
|
|
|
|
|
|
class Users(commands.Cog):
|
|
def __init__(self, bot):
|
|
self.bot: commands.Bot = bot
|
|
|
|
@commands.slash_command(guild_ids=None, name="avatar")
|
|
@option("User", description="Choose a member", input_type="user")
|
|
async def avatar(self, ctx: discord.ApplicationContext, user: discord.Member):
|
|
await ctx.respond(
|
|
embed=core_utils.generate_embed(
|
|
embed_title="{}".format(user.name),
|
|
embed_url=user.avatar,
|
|
embed_description="[Direct Link]({})".format(user.avatar),
|
|
)
|
|
)
|
|
|
|
|
|
def setup(bot):
|
|
bot.add_cog(Users(bot))
|