├── requirements.txt ├── ss.png ├── README.md └── bot.py /requirements.txt: -------------------------------------------------------------------------------- 1 | discord.py 2 | aiohttp -------------------------------------------------------------------------------- /ss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsec7/Roblox-Get-User-Info-Discord-Bot/main/ss.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Roblox Get User Info Discord Bot 2 | 3 | This Discord bot fetches Roblox profile details from a username. 4 | 5 | ![Screenshot](ss.png) 6 | 7 | My Roblox : [Vee (@dissec7ion)](https://www.roblox.com/users/8979299217/profile) 8 | 9 | **Crafted by**: https://github.com/vsec7 10 | 11 | --- 12 | 13 | ## ✅ Features 14 | 15 | - Show profile information 16 | - Avatar (headshot and full body) 17 | - Friends / Followers / Following count 18 | - First 5 Roblox badges 19 | - Account creation date 20 | 21 | --- 22 | 23 | ## 📦 Requirements 24 | 25 | - Python 3.8+ 26 | - `discord.py` 27 | - `aiohttp` 28 | 29 | ## Clone and Installation 30 | 31 | ``` 32 | git clone 33 | pip install -r requirements.txt 34 | ``` 35 | 36 | 37 | --- 38 | 39 | ## 🚀 Usage 40 | 41 | 1. Create a bot at [Discord Developer Portal](https://discord.com/developers/applications) 42 | 2. Enable **Message Content Intent** in Bot settings 43 | 3. Replace `TOKEN` in the code with your actual bot token 44 | 4. Run the bot with: 45 | 46 | ``` 47 | python bot.py 48 | ``` 49 | 50 | --- 51 | 52 | ## 💬 Commands 53 | 54 | ``` 55 | !rbx 56 | ``` 57 | 58 | Example: 59 | 60 | ``` 61 | !rbx pikalia_roblox 62 | ``` 63 | 64 | --- 65 | 66 | --- 67 | 68 | ## 🛠 Credits 69 | 70 | Made with ❤️ by [vsec7](https://github.com/vsec7) 71 | -------------------------------------------------------------------------------- /bot.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Roblox Get User Info Discord Bot 3 | # Crafted By Viloid ( github.com/vsec7 ) 4 | import discord 5 | from discord.ext import commands 6 | import aiohttp 7 | import os 8 | 9 | # get token from https://discord.com/developers/applications 10 | TOKEN = "" 11 | 12 | intents = discord.Intents.default() 13 | intents.message_content = True 14 | bot = commands.Bot(command_prefix="!", intents=intents) 15 | 16 | @bot.event 17 | async def on_ready(): 18 | print(f"Logged in as {bot.user}") 19 | 20 | @bot.command() 21 | async def rbx(ctx, username: str = None): 22 | if not username: 23 | return await ctx.send("Please provide a Roblox username. Example: `!rbx dissec7ion`") 24 | 25 | async with aiohttp.ClientSession() as session: 26 | try: 27 | # Get user ID from username 28 | async with session.post( 29 | "https://users.roblox.com/v1/usernames/users", 30 | json={"usernames": [username], "excludeBannedUsers": False}, 31 | headers={"Content-Type": "application/json"} 32 | ) as res: 33 | if res.status != 200: 34 | return await ctx.send("Roblox API error (user lookup).") 35 | data = await res.json() 36 | if not data["data"]: 37 | return await ctx.send("User not found.") 38 | user_id = data["data"][0]["id"] 39 | 40 | # Get user profile info 41 | async with session.get(f"https://users.roblox.com/v1/users/{user_id}") as res: 42 | info = await res.json() 43 | 44 | # Get avatar 45 | async with session.get( 46 | "https://thumbnails.roblox.com/v1/users/avatar-headshot", 47 | params={"userIds": user_id, "size": "420x420", "format": "Png", "isCircular": "true"} 48 | ) as res: 49 | avatar_data = await res.json() 50 | avatar_url = avatar_data["data"][0]["imageUrl"] 51 | 52 | # Get full body avatar 53 | async with session.get( 54 | "https://thumbnails.roblox.com/v1/users/avatar", 55 | params={"userIds": user_id, "size": "720x720", "format": "Png", "isCircular": "false"} 56 | ) as res: 57 | full_avatar_data = await res.json() 58 | full_avatar_url = full_avatar_data["data"][0]["imageUrl"] 59 | 60 | # Get friend count 61 | async with session.get(f"https://friends.roblox.com/v1/users/{user_id}/friends/count") as res: 62 | friend_data = await res.json() 63 | friend_count = friend_data.get("count", 0) 64 | 65 | # Get follower count 66 | async with session.get(f"https://friends.roblox.com/v1/users/{user_id}/followers/count") as res: 67 | followers_data = await res.json() 68 | follower_count = followers_data.get("count", 0) 69 | 70 | # Get following count 71 | async with session.get(f"https://friends.roblox.com/v1/users/{user_id}/followings/count") as res: 72 | followings_data = await res.json() 73 | following_count = followings_data.get("count", 0) 74 | 75 | # Get badges 76 | async with session.get(f"https://accountinformation.roblox.com/v1/users/{user_id}/roblox-badges") as res: 77 | badges_data = await res.json() 78 | badge_names = [badge["name"] for badge in badges_data[:5]] or ["None"] 79 | badge_list = ", ".join(badge_names) 80 | 81 | embed = discord.Embed( 82 | title=f"{info['displayName']} (@{info['name']})", 83 | url=f"https://www.roblox.com/users/{user_id}/profile", 84 | description=info.get("description", "No description"), 85 | color=discord.Color.blue() 86 | ) 87 | embed.set_thumbnail(url=avatar_url) 88 | embed.add_field(name="User ID", value=str(user_id), inline=False) 89 | embed.add_field(name="Friend", value=str(friend_count), inline=True) 90 | embed.add_field(name="Follower", value=str(follower_count), inline=True) 91 | embed.add_field(name="Following", value=str(following_count), inline=True) 92 | embed.add_field(name="Badges", value=badge_list, inline=False) 93 | embed.add_field(name="Full Avatar", value=f"[View Full]({full_avatar_url})", inline=True) 94 | embed.add_field(name="Created At", value=info["created"][:10], inline=True) 95 | embed.add_field(name="", value="====== BOT by [github.com/vsec7](https://github.com/vsec7) ======", inline=False) 96 | 97 | await ctx.send(embed=embed) 98 | 99 | except Exception as e: 100 | print(f"Error: {e}") 101 | await ctx.send("❌ Failed to fetch Roblox user info.") 102 | 103 | bot.run(TOKEN) 104 | --------------------------------------------------------------------------------