added dynmap_url to config

doc_update
Joey Hines 2018-08-09 21:44:50 -05:00
parent 73844c0c8f
commit 95f32b633a
2 changed files with 4 additions and 3 deletions

View File

@ -11,6 +11,7 @@ class Config:
self.world_name = self.config['Minecraft']['World_Name']
self.status = self.config['Discord']['Status']
self.prefix = self.config['Discord']['Prefix']
self.dynmap_url = self.config['Minecraft']['dynmap_url']
except:
print("Invalid config file")
quit(1)
@ -30,7 +31,7 @@ class Config:
config['Discord'] = {'Token': '', 'Status': '', 'Prefix': '', }
config['SQL'] = {'Dialect+Driver': '', 'username': '', 'password': '', 'host': '', 'port': '',
'database':'','test_args':''}
config['Minecraft'] = {'World_Name': ''}
config['Minecraft'] = {'World_Name': '', 'dynmap_url': ''}
with open('GeoffreyConfig.ini', 'w') as configfile:
config.write(configfile)

View File

@ -206,8 +206,8 @@ class Location(SQL_Base):
raise LocationInitError
def dynmap_link(self):
return '<http://24carrotcraft.com:8123/?worldname={}&mapname=surface&zoom=4&x={}&y=65&z={}>'.\
format(bot_config.world_name, self.x, self.z)
return '<{}/?worldname={}&mapname=surface&zoom=4&x={}&y=65&z={}>'.\
format(bot_config.dynmap_url, bot_config.world_name, self.x, self.z)
def pos_to_str(self):
return '(x= {}, z= {}) in the {}'.format(self.x, self.z, self.dimension.value.title())