Compare commits
No commits in common. "871479f7968472a7d70414d85983086ba7002924" and "0245f24f7b43a57aa40f48e4cf2b3ad65511cf22" have entirely different histories.
871479f796
...
0245f24f7b
26
main.py
26
main.py
@ -29,31 +29,5 @@ async def say(
|
|||||||
await ctx.respond("Nachricht gesendet", ephemeral=True)
|
await ctx.respond("Nachricht gesendet", ephemeral=True)
|
||||||
|
|
||||||
|
|
||||||
@bot.slash_command(name="userinfo", description="Zeige Infos über einen User")
|
|
||||||
async def info(
|
|
||||||
ctx,
|
|
||||||
alter: Option(int, "Das Alter", min_value=1, max_value=99),
|
|
||||||
user: Option(discord.Member, "Gib einen User an", default=None),
|
|
||||||
):
|
|
||||||
if user is None:
|
|
||||||
user = ctx.author
|
|
||||||
|
|
||||||
embed = discord.Embed(
|
|
||||||
title=f"Infos über {user.name}",
|
|
||||||
description=f"Hier siehst du alle Details über {user.mention}",
|
|
||||||
color=discord.Color.blue()
|
|
||||||
)
|
|
||||||
|
|
||||||
time = discord.utils.format_dt(user.created_at, "R")
|
|
||||||
|
|
||||||
embed.add_field(name="Account erstellt", value=time, inline=False)
|
|
||||||
embed.add_field(name="ID", value=user.id)
|
|
||||||
embed.add_field(name="Alter", value=alter)
|
|
||||||
|
|
||||||
embed.set_thumbnail(url=ctx.author.display_avatar.url)
|
|
||||||
embed.set_footer(text="Das ist ein Footer")
|
|
||||||
|
|
||||||
await ctx.respond(embed=embed)
|
|
||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
bot.run(os.getenv("DISCORD_TOKEN"))
|
bot.run(os.getenv("DISCORD_TOKEN"))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user