From eddf871203eadd40cd57240fa27cdbc510545174 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 10 Aug 2023 22:23:09 -0400 Subject: [PATCH] fix: updated exportchannel command for dpy 2.0 --- exportchannels/exportchannels.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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)