diff --git a/exportchannels/exportchannels.py b/exportchannels/exportchannels.py index 49f2ceb..5d10c96 100644 --- a/exportchannels/exportchannels.py +++ b/exportchannels/exportchannels.py @@ -75,12 +75,14 @@ class ExportChannels(commands.Cog): @commands.command() @commands.admin() - async def exportchannel(self, ctx, channel: discord.Channel): + async def exportchannel(self, ctx, channel: discord.TextChannel): """Exports a channel using Discord Chat Exporter.""" - token = await self.config.bot_token + token = await self.config.bot_token() dce_install = data_manager.bundled_data_path(self) - if token == 0: - await ctx.send(content="Please set your token with the ``exportset token`` command!") + if token is None: + await ctx.send(content=f"Please set your token with the ``{ctx.prefix}exportset token`` command!") return else: - await self.export(channel.id, token) + id_list = [thread.id for thread in channel.threads] + id_list.insert(0, channel.id) + await self.export(id_list)