fix: updated exportchannel command for dpy 2.0
This commit is contained in:
parent
ff8bf341c4
commit
eddf871203
1 changed files with 7 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue