DJTOMATO / glas-cogs

dumb cogs for Red-DiscordBot
MIT License
1 stars 2 forks source link

weeedcog .flatten no longer supported #2

Closed D0GT0R closed 1 year ago

D0GT0R commented 1 year ago

Discordpy moved to v2.0 and removed the support of .flatten.

Starting on Line 269, the following needs to be updated.

From:

    messages = await ctx.history(before=anchor_msg,
                                 limit=count,
                                 oldest_first=False).flatten()

To:

   messages = [ messages async for messages in ctx.history(before=anchor_msg,
                                 limit=count,
                                 oldest_first=False)]

I've made the change and tested this on my own instance of redbot and it works.

DJTOMATO commented 1 year ago

Thanks @D0GT0R made a commit to fix it https://github.com/DJTOMATO/glas-cogs/commit/4e430ac2ecdbf7bab7ab5175aff66c69543df983

D0GT0R commented 1 year ago

Great! Thanks for the quick follow up!