Changing references from container to server and adding map functionality
This commit is contained in:
parent
9f1c15b646
commit
dab72d2455
@ -327,7 +327,7 @@ async def on_message(message):
|
||||
)
|
||||
|
||||
|
||||
if message.content.startswith('!docker'):
|
||||
if message.content.startswith('!minecraft'):
|
||||
# Check permissions
|
||||
if not role_check.docker_permissions(message.author.roles):
|
||||
await client.send_message(
|
||||
@ -337,7 +337,7 @@ async def on_message(message):
|
||||
return
|
||||
|
||||
if len(message.content.split()) == 1:
|
||||
actions = ['restart', 'status', 'logs']
|
||||
actions = ['restart', 'status', 'logs', 'map']
|
||||
await client.send_message(
|
||||
message.channel,
|
||||
"\nSupported actions:```\n{}```".format(", ".join(actions))
|
||||
@ -349,7 +349,7 @@ async def on_message(message):
|
||||
except:
|
||||
await client.send_message(
|
||||
message.channel,
|
||||
"The minecraft container is not running"
|
||||
"The minecraft server is not running"
|
||||
)
|
||||
return
|
||||
|
||||
@ -358,7 +358,7 @@ async def on_message(message):
|
||||
if action == 'restart':
|
||||
await client.send_message(
|
||||
message.channel,
|
||||
"{}, restart the container? [!yes/!no]".format(
|
||||
"{}, restart the server? [!yes/!no]".format(
|
||||
message.author.mention)
|
||||
)
|
||||
|
||||
@ -371,7 +371,7 @@ async def on_message(message):
|
||||
if confirm_restart:
|
||||
await client.send_message(
|
||||
message.channel,
|
||||
"Sending restart action to {} container".format(
|
||||
"Sending restart action to {} server".format(
|
||||
minecraft_container.name
|
||||
)
|
||||
)
|
||||
@ -381,7 +381,7 @@ async def on_message(message):
|
||||
if action == 'status':
|
||||
await client.send_message(
|
||||
message.channel,
|
||||
"{} container is {}".format(
|
||||
"{} server is {}".format(
|
||||
minecraft_container.name,
|
||||
minecraft_container.status
|
||||
)
|
||||
@ -400,7 +400,7 @@ async def on_message(message):
|
||||
if len(log_stream) >= num_lines:
|
||||
await client.send_message(
|
||||
message.channel,
|
||||
"Pulling last {} lines from {} container".format(
|
||||
"Pulling last {} lines from the {} server ".format(
|
||||
num_lines,
|
||||
minecraft_container.name
|
||||
)
|
||||
@ -420,5 +420,11 @@ async def on_message(message):
|
||||
message.channel,
|
||||
"There arent {} lines of output yet".format(num_lines)
|
||||
)
|
||||
if action == 'map':
|
||||
await client.send_message(
|
||||
message.channel,
|
||||
"http://luker.zzzz.io/minecraft"
|
||||
)
|
||||
|
||||
|
||||
client.run(tokens[dragon_environment])
|
||||
|
Loading…
x
Reference in New Issue
Block a user