Merge branch 'master' of np.slipstreamm.dev:discordbot

This commit is contained in:
Slipstream 2025-06-04 16:59:52 -06:00
commit 2e13c5d8e0
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD

View File

@ -42,9 +42,15 @@ class FetchUserCog(commands.Cog, name="FetchUser"):
await sendable(embed=embed)
@commands.hybrid_command(name="fetchuser", description="Fetch a user by ID and show info.")
async def fetchuser(self, ctx: commands.Context, user_id: int):
async def fetchuser(self, ctx: commands.Context, user_id: str):
"""Fetch a Discord user by ID."""
await self._fetch_user_and_send(ctx.send, user_id)
try:
user_id_int = int(user_id)
except ValueError:
await ctx.send("❌ Invalid user ID provided.")
return
await self._fetch_user_and_send(ctx.send, user_id_int)
async def setup(bot: commands.Bot):
await bot.add_cog(FetchUserCog(bot))