Improve exception handling
This commit is contained in:
+4
-2
@@ -18,8 +18,6 @@ def handle_join_game(packet, g):
|
||||
|
||||
def handle_block_change(packet, g):
|
||||
l = g.local_state
|
||||
print('block change:')
|
||||
print(packet)
|
||||
|
||||
if packet.block_state_id == 3887:
|
||||
try:
|
||||
@@ -92,6 +90,10 @@ def handle_chat(message, g):
|
||||
if command == 'afk':
|
||||
reply = '/afk'
|
||||
|
||||
if command == 'error':
|
||||
reply = 'ok'
|
||||
raise
|
||||
|
||||
if reply:
|
||||
print(reply)
|
||||
g.chat.send(reply)
|
||||
|
||||
Reference in New Issue
Block a user