def on_ready(self):
self.emptycogLoaded = os.path.exists('data/cmdcommands/emptycog.py')
if not self.emptycogLoaded:
print('Emptycog.py was not found, trying to download')
try:
async with aiohttp.get("https://raw.githubusercontent.com/PlanetTeamSpeakk/PTSCogs-attributes/master/emptycog.py") as r:
emptycog = await r.content.read()
with open('data/cmdcommands/emptycog.py','wb') as f:
f.write(emptycog)
print('Succesfully downloaded emptycog.py')
except Exception as e:
print(e)
print("Error occured, did not download emptycog.py, go to https://raw.githubusercontent.com/PlanetTeamSpeakk/PTSCogs/master/emptycog.py press ctrl+s and save it in the data/cmdcommands/ folder.")
else:
pass
评论列表
文章目录