testing userinfo command
This commit is contained in:
parent
d9fc85ae03
commit
d628e0ef0d
1 changed files with 19 additions and 6 deletions
|
@ -11,18 +11,31 @@ class Galaxy(commands.Cog):
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
@checks.admin()
|
async def userinfo(self, ctx, member: discord.Member):
|
||||||
async def roleinfo_test(self, ctx, role: discord.Role):
|
"""Gives information on a specific person."""
|
||||||
"""Testing"""
|
if member.color.value == 0:
|
||||||
list = role.members
|
colorint = 10070709
|
||||||
await ctx.send(list.name)
|
color = "99aab5"
|
||||||
|
else:
|
||||||
|
colorint = member.color.value
|
||||||
|
color = re.sub('#',"",str(member.color))
|
||||||
|
colorcodelink = f"https://www.color-hex.com/color/{color}"
|
||||||
|
timestamp_create = int(datetime.timestamp(member.created_at))
|
||||||
|
timestamp_join = int(datetime.timestamp(member.joined_at))
|
||||||
|
embed = discord.Embed(title=f"{member.name}#{member.disriminator}", color=color)
|
||||||
|
embed.add_field(name="Joined At", value=f"<t:{timestamp_join}>")
|
||||||
|
embed.add_field(name="Created At", value=f"<t:{timestamp_create}>")
|
||||||
|
embed.add_field(name="Avatar", value=f"[Click Here]({member.avatar_url})")
|
||||||
|
embed.add_field(name="Roles", value=f"{member.roles}")
|
||||||
|
embed.set_thumbnail(url={member.avatar_url})
|
||||||
|
embed.set_footer(text=f"ID: {member.id}")
|
||||||
|
await ctx.send(embed=embed)
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
async def roleinfo(self, ctx, role: discord.Role):
|
async def roleinfo(self, ctx, role: discord.Role):
|
||||||
"""Gives information on a specific role."""
|
"""Gives information on a specific role."""
|
||||||
permissions = role.permissions
|
permissions = role.permissions
|
||||||
color = re.sub('#',"",str(role.color))
|
|
||||||
if role.color.value == 0:
|
if role.color.value == 0:
|
||||||
colorint = 10070709
|
colorint = 10070709
|
||||||
color = "99aab5"
|
color = "99aab5"
|
||||||
|
|
Loading…
Reference in a new issue