import os
import sys
from chatexchange.client import Client
import js2py
import math
import re
import random
keep_running = True
last_input = ''
def run(cmd):
command = cmd.split(' ')[0]
args = cmd.split(' ')[1:]
global keep_running
if command == 'alive':
main_room.send_message('Ya really doubt me huh?')
elif command == 'js':
context.eval(' '.join(args))
else:
main_room.send_message('error.')
def on_event(event, _):
global last_input
try: