Update whoami.py

This commit is contained in:
WhatDidYouExpect 2025-01-05 20:36:18 +01:00 committed by GitHub
parent 3487547720
commit 0110affad7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,17 +2,23 @@ import discord
from discord.ext import commands from discord.ext import commands
class whoami(commands.Cog): class whoami(commands.Cog):
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot
@commands.command()
async def whoami(self, ctx):
user_id = ctx.author.id
username = ctx.author.name
embed = discord.Embed(
title="User Information",
description=f"Your User ID is: {user_id}\n"
f"Your username is: {username}\n"
f"Your nickname in this server is: <@{user_id}>",
color=discord.Color.blue()
)
await ctx.send(embed=embed)
@commands.command()
async def whoami(self, ctx):
user_id = ctx.author.id
username = ctx.author.name
await ctx.send(
f"Your User ID is: {user_id}\n"
f"Your username is: {username}\n"
f"Your nickname in this server is: <@{user_id}>"
)
async def setup(bot): async def setup(bot):
await bot.add_cog(whoami(bot)) await bot.add_cog(whoami(bot))