pyrobloxbot package
Submodules
pyrobloxbot.exceptions module
- exception pyrobloxbot.exceptions.InvalidSlotNumberException
Bases:
Exception
Raised by equip_slot when slot isn’t between 0 and 9
- exception pyrobloxbot.exceptions.InvalidUiDirectionException
Bases:
Exception
Raised by ui_navigate when given a direction that isn’t in literals.UI_NAVIGATE_DIRECTIONS.VALUES
- exception pyrobloxbot.exceptions.InvalidWalkDirectionException
Bases:
Exception
Raised by walk when given a direction that isn’t in literals.WALK_DIRECTIONS.VALUES
- exception pyrobloxbot.exceptions.NoRobloxWindowException
Bases:
Exception
Raised when a function can’t find a roblox window to focus
pyrobloxbot.literals module
- class pyrobloxbot.literals.KEYBOARD_KEYS
Bases:
object
Valid strings to pass to keyboard_action and hold_keyboard_action
- VALUES
alias of
Literal
[’t’, ‘n’, ‘r’, ‘ ‘, ‘!’, ‘”’, ‘#’, ‘$’, ‘%’, ‘&’, “’”, ‘(’, ‘)’, ‘*’, ‘+’, ‘,’, ‘-’, ‘.’, ‘/’, ‘0’, ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’, ‘9’, ‘:’, ‘;’, ‘<’, ‘=’, ‘>’, ‘?’, ‘@’, ‘[’, ‘\’, ‘]’, ‘^’, ‘_’, ‘`’, ‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’, ‘i’, ‘j’, ‘k’, ‘l’, ‘m’, ‘n’, ‘o’, ‘p’, ‘q’, ‘r’, ‘s’, ‘t’, ‘u’, ‘v’, ‘w’, ‘x’, ‘y’, ‘z’, ‘{’, ‘|’, ‘}’, ‘~’, ‘accept’, ‘add’, ‘alt’, ‘altleft’, ‘altright’, ‘apps’, ‘backspace’, ‘browserback’, ‘browserfavorites’, ‘browserforward’, ‘browserhome’, ‘browserrefresh’, ‘browsersearch’, ‘browserstop’, ‘capslock’, ‘clear’, ‘convert’, ‘ctrl’, ‘ctrlleft’, ‘ctrlright’, ‘decimal’, ‘del’, ‘delete’, ‘divide’, ‘down’, ‘end’, ‘enter’, ‘esc’, ‘escape’, ‘execute’, ‘f1’, ‘f10’, ‘f11’, ‘f12’, ‘f13’, ‘f14’, ‘f15’, ‘f16’, ‘f17’, ‘f18’, ‘f19’, ‘f2’, ‘f20’, ‘f21’, ‘f22’, ‘f23’, ‘f24’, ‘f3’, ‘f4’, ‘f5’, ‘f6’, ‘f7’, ‘f8’, ‘f9’, ‘final’, ‘fn’, ‘hanguel’, ‘hangul’, ‘hanja’, ‘help’, ‘home’, ‘insert’, ‘junja’, ‘kana’, ‘kanji’, ‘launchapp1’, ‘launchapp2’, ‘launchmail’, ‘launchmediaselect’, ‘left’, ‘modechange’, ‘multiply’, ‘nexttrack’, ‘nonconvert’, ‘num0’, ‘num1’, ‘num2’, ‘num3’, ‘num4’, ‘num5’, ‘num6’, ‘num7’, ‘num8’, ‘num9’, ‘numlock’, ‘pagedown’, ‘pageup’, ‘pause’, ‘pgdn’, ‘pgup’, ‘playpause’, ‘prevtrack’, ‘print’, ‘printscreen’, ‘prntscrn’, ‘prtsc’, ‘prtscr’, ‘return’, ‘right’, ‘scrolllock’, ‘select’, ‘separator’, ‘shift’, ‘shiftleft’, ‘shiftright’, ‘sleep’, ‘space’, ‘stop’, ‘subtract’, ‘tab’, ‘up’, ‘volumedown’, ‘volumemute’, ‘volumeup’, ‘win’, ‘winleft’, ‘winright’, ‘yen’, ‘command’, ‘option’, ‘optionleft’, ‘optionright’]
Module contents
- pyrobloxbot.chat(message: str)
Sends a message in chat
- Parameters:
message (str) – The message to send
- pyrobloxbot.equip_slot(slot: int)
Equip a given item slot
- Parameters:
slot (int) – The item slot to equip
- Raises:
InvalidSlotNumberException – Raised when slot isn’t between 0 and 9
- pyrobloxbot.hold_keyboard_action(*actions: KEYBOARD_KEYS.VALUES, duration: float)
Holds one or more keyboard keys for a given time
If more than one key is provided, all keys will be held and released simultaneously
- Parameters:
actions (KEYBOARD_KEYS) – The keys to be held
duration (float) – How long to hold for, in seconds
- pyrobloxbot.jump(number_of_jumps: int = 1, delay: float = 0)
Jumps for a given number of times
- Parameters:
number_of_jumps (int) – How many times to jump, defaults to 1
delay (float) – How much time between jumps, in seconds, defaults to 0
- pyrobloxbot.jump_continuous(duration: float)
Holds jump for a given time
- Parameters:
duration (float) – How long to hold jump for, in seconds
- pyrobloxbot.keyboard_action(*actions: KEYBOARD_KEYS.VALUES)
Presses one or more keyboard keys
- Parameters:
actions (KEYBOARD_KEYS) – The keys to be pressed
- pyrobloxbot.leave_game(interval: float = 0.5)
Leaves the current game
- Parameters:
interval (float) – How long between each keyboard input, in seconds, defaults to 0.5
- pyrobloxbot.require_focus(fn)
A decorator that ensures the roblox window is in focus before running the decorated function
This is used by all pyrobloxbot functions
- Raises:
NoRobloxWindowException – Raised when can’t find a roblox window to focus
- pyrobloxbot.reset_player(interval: float = 0.5)
Resets player character
- Parameters:
interval (float) – How long between each keyboard input, in seconds, defaults to 0.5
- pyrobloxbot.set_failsafe_hotkey(*keys: KEYBOARD_KEYS.VALUES)
Changes hotkey required to trigger the failsafe
The default hotkey is control + m
- Parameters:
keys (KEYBOARD_KEYS) – The key combination for triggering the failsafe
- pyrobloxbot.toggle_shift_lock()
Toggles shift lock (Shift lock switch must be enabled in roblox settings)
Toggles ui navigation mode.
This is called by all ui navigation functions if ui navigation mode is disabled.
You can change the key used to toggle this mode by changing the module’s UI_NAV_KEY variable
- pyrobloxbot.ui_click()
Click on currently selected ui element
Navigates through roblox ui in specified direction
- Parameters:
direction (UI_NAVIGATE_DIRECTIONS) – The direction to navigate in
- Raises:
InvalidUiDirectionException – Raised if direction isn’t one of
Navigate down in ui elements
Navigate left in ui elements
Navigate right in ui elements
Navigate up in ui elements
- pyrobloxbot.walk(*directions: WALK_DIRECTIONS.VALUES, duration: float)
Walks in one or more directions for a given time
If more than one direction is given it will walk diagonally
- Parameters:
directions (WALK_DIRECTIONS) – The directions to walk in
duration (float) – How long to walk for, in seconds
- Raises:
InvalidWalkDirectionException – Raised when given directions aren’t one of literals.WALK_DIRECTIONS.VALUES
- pyrobloxbot.walk_back(duration: float)
Walks back for a given time
- Parameters:
duration (float) – How long to walk for, in seconds
- pyrobloxbot.walk_forward(duration: float)
Walks forward for a given time
- Parameters:
duration (float) – How long to walk for, in seconds
- pyrobloxbot.walk_left(duration: float)
Walks left for a given time
- Parameters:
duration (float) – How long to walk for, in seconds
- pyrobloxbot.walk_right(duration: float)
Walks right for a given time
- Parameters:
duration (float) – How long to walk for, in seconds