Skip to main content

Handler for the Roblox API

Project description

PyBlox2

MIT License Version
High level library for making Roblox bots in Python

Examples

A Basic Example

import PyBlox2

client = PyBlox2.BloxClient()

@client.event
async def ready(ctx):
    await client.fetch("friend_requests")
    player = client.friend_requests[0]
    await player.fetch("friends")

    (player.friends[0])

@client.event
async def request(ctx):
    print("Received status code ", ctx[0].status)

client.run(ROBLOSECURITY) # ROBLOSECURITY COOKIE

Changing someone's role

import PyBlox2

client = PyBlox2.BloxClient()

@client.event
async def ready(ctx):
    group = await client.get_group(5029105)
    member = await group.get_member("fego2015")
    role = await group.get_role("Moderators")
    await member.set_role(role)

@client.event
async def request(ctx):

    ("Received status code ", ctx[0].status)

client.run(ROBLOSECURITY) # ROBLOSECURITY COOKIE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for PyBlox2, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size PyBlox2-1.0.0-py3-none-any.whl (26.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size PyBlox2-1.0.0.tar.gz (13.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page