@commands.command(aliases=['adc'])
async def anchor_delete_choice(self, ctx, bottom: int, top: int):
    "Given the message ID's for two messages, delete all messages between them."
    bottom_msg = (await ctx.channel.fetch_message(bottom))
    top_msg = (await ctx.channel.fetch_message(top))
    if (not (bottom_msg.created_at > top_msg.created_at)):
        (await ctx.send('Bottom anchor must come after top anchor.'))
        return
    anchored = False
    num_deleted = 0
    async for message in ctx.channel.history(limit=None):
        if (message.id == bottom):
            anchored = True
            (await message.delete())
            num_deleted += 1
            continue
        if anchored:
            num_deleted += 1
            (await message.delete())
        if (message.id == top):
            anchored = False
            break
    (await ctx.send(f'Deleted {num_deleted} messages.'))
    (await ctx.message.delete())
Given the message ID's for two messages, delete all messages between them.
@commands.command(aliases=['adc'])
async def anchor_delete_choice(self, ctx, bottom: int, top: int):
    
    bottom_msg = (await ctx.channel.fetch_message(bottom))
    top_msg = (await ctx.channel.fetch_message(top))
    if (not (bottom_msg.created_at > top_msg.created_at)):
        (await ctx.send('Bottom anchor must come after top anchor.'))
        return
    anchored = False
    num_deleted = 0
    async for message in ctx.channel.history(limit=None):
        if (message.id == bottom):
            anchored = True
            (await message.delete())
            num_deleted += 1
            continue
        if anchored:
            num_deleted += 1
            (await message.delete())
        if (message.id == top):
            anchored = False
            break
    (await ctx.send(f'Deleted {num_deleted} messages.'))
    (await ctx.message.delete())