Adding minecraft map functionality back to the bot

This commit is contained in:
Luke Robles 2020-05-05 17:47:35 -07:00
parent 7748a54d3c
commit e770ed86a6

View File

@ -412,17 +412,17 @@ async def on_message(message):
# if message.content.startswith('!minecraft'): if message.content.startswith('!minecraft'):
# # Check permissions # Figure out what action they want to take
# if not role_check.docker_permissions(message.author.roles): action = message.content.split()[1]
# await client.send_message( if action == 'map':
# message.channel, await client.send_message(
# "You dont have permission to run docker commands" message.channel,
# ) "https://luker.gq/minecraft"
# return )
# if len(message.content.split()) == 1: # if len(message.content.split()) == 1:
# actions = ['restart', 'status', 'logs', 'map'] # actions = ['restart', 'status', 'logs']
# await client.send_message( # await client.send_message(
# message.channel, # message.channel,
# "\nSupported actions:```\n{}```".format(", ".join(actions)) # "\nSupported actions:```\n{}```".format(", ".join(actions))
@ -430,7 +430,7 @@ async def on_message(message):
# else: # else:
# docker_client = docker.from_env() # docker_client = docker.from_env()
# try: # try:
# minecraft_container = docker_client.containers.get('beyondreality') # minecraft_container = docker_client.containers.get('minecraft_eternal')
# except: # except:
# await client.send_message( # await client.send_message(
# message.channel, # message.channel,
@ -438,8 +438,6 @@ async def on_message(message):
# ) # )
# return # return
# # Figure out what action they want to take
# action = message.content.split()[1]
# if action == 'restart': # if action == 'restart':
# await client.send_message( # await client.send_message(
# message.channel, # message.channel,
@ -505,11 +503,6 @@ async def on_message(message):
# message.channel, # message.channel,
# "There arent {} lines of output yet".format(num_lines) # "There arent {} lines of output yet".format(num_lines)
# ) # )
# if action == 'map':
# await client.send_message(
# message.channel,
# "https://luker.gq/minecraft"
# )
client.run(os.getenv('token')) client.run(os.getenv('token'))