added dynmap_url to config
parent
73844c0c8f
commit
95f32b633a
|
@ -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)
|
||||
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue