Skip to content

Commit

Permalink
Tidied up unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
NexInfinite committed Aug 4, 2020
1 parent 48231a4 commit 60c33d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 2 additions & 3 deletions Hiven/Websocket/websocket_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@

class WebSocket:
def __init__(self, token, debug=False, output=False, outer=None):
self.TOKEN = token
self.user = None
self.restURL = "https://api.hiven.io/v1"
self.WEBSOCKET = "wss://swarm-dev.hiven.io/socket?encoding=json&compression=text_json"
self.HEARTBEAT = 0
self.TOKEN = token
self.OUTPUT = output
self.outer = outer
if debug:
Expand All @@ -33,7 +32,7 @@ def start(self):
def on_open(self, ws):
ws.send('{"op": 2, "d":{"token": "' + self.TOKEN + '"}}')

def run(*args):
def run():
while True:
time.sleep(self.HEARTBEAT / 1000)
ws.send('{"op": 3}')
Expand Down
8 changes: 2 additions & 6 deletions Hiven/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@

class Bot:
def __init__(self, token, debug=False, output=False):
self.TOKEN = token
self.restURL = "https://api.hiven.io/v1"
self.WEBSOCKET = "wss://swarm-dev.hiven.io/socket?encoding=json&compression=text_json"
self.HEARTBEAT = 0
self.OUTPUT = output
self.DEBUG = debug
self.ws = WebSocket(self.TOKEN, self.DEBUG, self.OUTPUT, self)
self.TOKEN = token
self.user = None
self.ws = WebSocket(self.TOKEN, debug, output, self)

def login(self):
self.ws.start()
Expand Down

0 comments on commit 60c33d6

Please sign in to comment.