async def METHOD_NAME(self, channel, prompt, cut_off_ts):
    messages = [message async for message in channel.history(limit=512) if message.content != ""]
    messages = [message for message in messages if message.author.id != self.bot.user.id]
    messages = [message for message in messages if message.created_at > cut_off_ts]
    if len(messages) < 32:
        return None
    prefix = "The following is a chat log. Everything prefixed with `>` is a quote."
    while len(self.tokenizer(self.generate_prompt(messages, prefix, prompt))['input_ids']) > (4096 - 256):
        # remove the oldest message
        messages.pop(0)
    prompt = self.generate_prompt(messages, prefix, prompt)
    response = openai.Completion.create(
        engine=self.engine,
        prompt=prompt,
        max_tokens=256,
        temperature=0.7,
        top_p=1.0,
        frequency_penalty=0.0,
        presence_penalty=1
    )
    return response, prompt