Handler for the Roblox API
Project description
PyBlox2
High level library for making Roblox bots in Python
Examples
A Basic Example
import PyBlox2
import time
# the verbose arguement could be ignored
client = PyBlox2.BloxClient()
@client.event
async def ready(ctx):
await client.fetch("friend_requests")
player = client.friend_requests[0]
await player.fetch("friends")
print(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
import time
# the verbose arguement could be ignored
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):
print("Received status code ", ctx[0].status)
client.run(ROBLOSECURITY) # ROBLOSECURITY COOKIE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyBlox2-1.0.0b0.tar.gz
(8.1 kB
view hashes)
Built Distribution
PyBlox2-1.0.0b0-py3-none-any.whl
(11.4 kB
view hashes)
Close
Hashes for PyBlox2-1.0.0b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f49bfa1f6c8895f111e687ebbb5b313c65b3f09699459ac3bfd55bd39b709849 |
|
MD5 | 408483540a6b97d5c185242d3395f4d2 |
|
BLAKE2b-256 | 1041cf4c9b32a2e3f19b4a09b6a653d36199d3ea7e8162f7ac8264380315ce38 |