def fetch_channel(self, ctx, subfolder: str, channel: discord.Channel = None, attachments: bool = None):
"Fetch complete logs for a channel. Defaults to the current one."
msg = await self.bot.say('Dispatching fetch task...')
start = datetime.now()
cookie = FetchCookie(ctx, start, msg)
if channel is None:
channel = ctx.message.channel
callback = partial(self.fetch_callback, cookie)
task = self.fetch_task([channel], subfolder, attachments=attachments,
status_cb=callback)
self.fetch_handle = self.bot.loop.create_task(task)
评论列表
文章目录