removed handle_error function
This commit is contained in:
parent
be04b5f203
commit
97dfc90d75
1 changed files with 1 additions and 9 deletions
|
|
@ -32,14 +32,6 @@ bot = commands.Bot(command_prefix='!', intents=intents)
|
||||||
#discord setup END
|
#discord setup END
|
||||||
|
|
||||||
|
|
||||||
async def handle_error(error):
|
|
||||||
print(error)
|
|
||||||
current_time = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
|
|
||||||
log_line = current_time + ': ' + str(error) + '\n'
|
|
||||||
with open("data/error_log.txt", 'a') as f:
|
|
||||||
f.write(log_line)
|
|
||||||
return error
|
|
||||||
|
|
||||||
async def folder_setup():
|
async def folder_setup():
|
||||||
# Only tmp, extensions and data are supported, all other folders only exist for backwards compatibility and will be removed soon!
|
# Only tmp, extensions and data are supported, all other folders only exist for backwards compatibility and will be removed soon!
|
||||||
folder_names = ["tmp", "extensions", "data", "channels","channels/config", "channels/logs"]
|
folder_names = ["tmp", "extensions", "data", "channels","channels/config", "channels/logs"]
|
||||||
|
|
@ -64,7 +56,7 @@ async def task_loop():
|
||||||
try:
|
try:
|
||||||
await delete_all_files("tmp/")
|
await delete_all_files("tmp/")
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
await handle_error(error)
|
print("Failed to delete_all_files")
|
||||||
|
|
||||||
async def create_session():
|
async def create_session():
|
||||||
return aiohttp.ClientSession()
|
return aiohttp.ClientSession()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue