Get Started - Learn How To Make Your Bot!GuidesCode SnippetsGet methodsPost methodsWeb APIUseful linksList of all currently Free ItemsList of EmotesHighrise Bot SDK Changelog
Template
If youβre a Replit user also check: π Always running - Replit
This is a template that can be used to run your bot, you just need to replace the Bot Settings variable with your room_id, room_id, bot_file, and bot_class.
You will need to create a file and name it as you wish, I suggest to use run.py.
MAKE SURE TO HAVE YOUR BOT FILE CODDED AND WORKING BEFORE TRYING TO CREATE A βRUNβ FILE.
from highrise.__main__ import * import time """Bot Settings""" room_id = "room id here" bot_token = "bot token here" bot_file = "bot file name here" bot_class = "bot class name here" if __name__ == "__main__": definitions = [ BotDefinition( getattr(import_module(bot_file), bot_class)(), room_id, bot_token)] # More BotDefinition classes can be added to the definitions list while True: try: arun(main(definitions)) except Exception as e: # Print the full traceback for the exception import traceback print("Caught an exception:") traceback.print_exc() # This will print the full traceback time.sleep(1) continue
Command line to run the script for each OS:
Windows
In your terminal you can write:
py run.py
or python run.py
Linux
In your terminal you can write:
python run.py
Mac
In your terminal you can write:
python run.py
Replit
In your Shell terminal you can write:
python run.py
Or click in the Run button with the
run.py
file selected.VSCode
In your terminal you can write:
py run.py
(if using Windows) or python run.py
Or click in the tab Run and the Run Without Debugging, with the
run.py
file selected (the shortcut for that action is usually Ctrl + F5), you can also use Start Debugging (whose shortcut is usually F5).Β