diff --git a/exportchannels/exportchannels.py b/exportchannels/exportchannels.py index 3437ce2..49f2ceb 100644 --- a/exportchannels/exportchannels.py +++ b/exportchannels/exportchannels.py @@ -15,10 +15,12 @@ class ExportChannels(commands.Cog): ) - def export(self, ctx, channel, token): + async def export(self, channels: list): + token = await self.config.bot_token() self.data_path = data_manager.cog_data_path(self) self.bundled_data_path = data_manager.bundled_data_path(self) out = f'{self.data_path}{os.sep}Exported Channels' + channel = channels[0] try: os.mkdir(out) except FileExistsError: @@ -34,8 +36,6 @@ class ExportChannels(commands.Cog): '--media', '--fuck_russia', 'true', ] - if bot: - args += '--bot' os.chdir(self.bundled_data_path) subprocess.call(args) args = [ @@ -45,13 +45,11 @@ class ExportChannels(commands.Cog): '--format', 'Json', '--output', f'/{out}/%G (%g)/%C (%c)/DCE-f.json', '--token', f'{token}', - '--channel', {channel}, + '--channel', {channels}, '--reuse_media', '--media', '--fuck_russia', 'true', ] - if bot: - args += '--bot' os.chdir(self.bundled_data_path) subprocess.call(args)