feat: improved windows compatibility

This commit is contained in:
Seaswimmer 2023-08-11 15:57:41 -04:00
parent 98d0033b19
commit 16e74356d4
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -21,6 +21,8 @@ class ExportChannels(commands.Cog):
self.bundled_data_path = data_manager.bundled_data_path(self) self.bundled_data_path = data_manager.bundled_data_path(self)
out = f'{self.data_path}{os.sep}Exported Channels' out = f'{self.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_json = f'{os.sep}{out}{os.sep}%g{os.sep}%c{os.sep}DCE-f.json'
try: try:
os.mkdir(out) os.mkdir(out)
except FileExistsError: except FileExistsError:
@ -30,9 +32,9 @@ class ExportChannels(commands.Cog):
'DiscordChatExporter.Cli.dll', 'DiscordChatExporter.Cli.dll',
'export', 'export',
'--format', 'HtmlDark', '--format', 'HtmlDark',
'--output', f'{os.sep}{out}{os.sep}%G (%g){os.sep}%C (%c){os.sep}Export.html', '--output', file_location_html,
'--token', f'{token}', '--token', token,
'--channel', {channel}, '--channel', channel,
'--media', '--media',
'--fuck_russia', 'true', '--fuck_russia', 'true',
] ]
@ -43,9 +45,9 @@ class ExportChannels(commands.Cog):
'DiscordChatExporter.Cli.dll', 'DiscordChatExporter.Cli.dll',
'export', 'export',
'--format', 'Json', '--format', 'Json',
'--output', f'{os.sep}{out}{os.sep}%G (%g){os.sep}%C (%c){os.sep}DCE-f.json', '--output', file_location_json,
'--token', f'{token}', '--token', token,
'--channel', {channels}, '--channel', channels,
'--reuse_media', '--reuse_media',
'--media', '--media',
'--fuck_russia', 'true', '--fuck_russia', 'true',