fix(issues): hopefully fixed the cog just not working
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 5s

This commit is contained in:
Seaswimmer 2023-08-17 02:54:32 -04:00
parent 52752f06b5
commit c7dd2ab0fe
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -21,9 +21,9 @@ class ExportChannels(commands.Cog):
token = await self.config.bot_token() token = await self.config.bot_token()
if token is None: if token is None:
raise(self.ConfigException, "Bot token not set!") raise(self.ConfigException, "Bot token not set!")
self.data_path = data_manager.cog_data_path(self) data_path = data_manager.cog_data_path(self)
self.bundled_data_path = data_manager.bundled_data_path(self) bundled_data_path = data_manager.bundled_data_path(self)
out = f'{self.data_path}{os.sep}Exported Channels' out = f'{data_path}{os.sep}Exported Channels'
channel = channels[0] channel = channels[0]
file_location_html = f'{os.sep}{out}{os.sep}%g{os.sep}%c{os.sep}Export.html' file_location_html = f'{os.sep}{out}{os.sep}%g{os.sep}%c{os.sep}Export.html'
file_location_json = f'{os.sep}{out}{os.sep}%g{os.sep}%c{os.sep}DCE-f.json' file_location_json = f'{os.sep}{out}{os.sep}%g{os.sep}%c{os.sep}DCE-f.json'
@ -39,10 +39,11 @@ class ExportChannels(commands.Cog):
'--output', file_location_html, '--output', file_location_html,
'--token', token, '--token', token,
'--channel', channel, '--channel', channel,
'--reuse-media',
'--media', '--media',
'--fuck_russia', 'true', '--fuck_russia', 'true',
] ]
os.chdir(self.bundled_data_path) os.chdir(bundled_data_path)
process_1 = await asyncio.create_subprocess_exec(*args) process_1 = await asyncio.create_subprocess_exec(*args)
while True: while True:
return_code_1 = process_1.poll() return_code_1 = process_1.poll()
@ -58,9 +59,10 @@ class ExportChannels(commands.Cog):
'--channel', channels, '--channel', channels,
'--reuse_media', '--reuse_media',
'--media', '--media',
'--markdown', 'false',
'--fuck_russia', 'true', '--fuck_russia', 'true',
] ]
os.chdir(self.bundled_data_path) os.chdir(bundled_data_path)
process_2 = await asyncio.create_subprocess_exec(*args) process_2 = await asyncio.create_subprocess_exec(*args)
while True: while True:
return_code_2 = process_2.poll() return_code_2 = process_2.poll()