mirror of
https://github.com/opus-tango/minecraft-server-discord-bot.git
synced 2026-03-20 03:55:20 +00:00
fix read pipe call
This commit is contained in:
4
bot.py
4
bot.py
@@ -260,7 +260,7 @@ async def _stop_server_internal(ctx, servername, method):
|
||||
active_server = None # Clear active server state
|
||||
|
||||
async def connect_to_existing_pipe():
|
||||
global active_server, active_server_pipe_task
|
||||
global active_server, active_server_pipe_task, chat_channel, bot
|
||||
# Get list of servers
|
||||
with open('servers.json', 'r') as f:
|
||||
servers = json.load(f)
|
||||
@@ -276,7 +276,7 @@ async def connect_to_existing_pipe():
|
||||
if server['servername'] in stdout:
|
||||
active_server = server['servername']
|
||||
if os.path.exists(_get_pipe_path(active_server)):
|
||||
await _read_from_pipe(active_server)
|
||||
await _read_from_pipe(active_server, chat_channel, bot)
|
||||
return
|
||||
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user