diff --git a/exportchannels/exportchannels.py b/exportchannels/exportchannels.py index 3f5d2c4..9e4bac0 100644 --- a/exportchannels/exportchannels.py +++ b/exportchannels/exportchannels.py @@ -39,7 +39,11 @@ class ExportChannels(commands.Cog): '--fuck_russia', 'true', ] os.chdir(self.bundled_data_path) - subprocess.call(args) + process_1 = await asyncio.create_subprocess_exec(*args) + while True: + return_code_1 = process_1.poll() + if return_code_1 is not None: + break args = [ 'dotnet', 'DiscordChatExporter.Cli.dll', @@ -53,7 +57,11 @@ class ExportChannels(commands.Cog): '--fuck_russia', 'true', ] os.chdir(self.bundled_data_path) - subprocess.call(args) + process_2 = await asyncio.create_subprocess_exec(*args) + while True: + return_code_2 = process_2.poll() + if return_code_2 is not None: + break @commands.group() @checks.is_owner()