responsive error handling

This commit is contained in:
2021-08-11 17:18:30 -05:00
parent b6d41b6ba5
commit 3a4d0084fe
2 changed files with 15 additions and 12 deletions

2
msg.py
View File

@@ -164,7 +164,7 @@ async def message_gen(client: discord.Client, limit=20, days: int = 90, **kwargs
channels = filter(lambda c: isinstance(c, discord.TextChannel), channels)
channels = filter(lambda c: c.category.name != 'Archive', channels)
channels = sorted(channels, key=lambda c: (c.category.name, c.name))
for channel in channels[:5]:
for channel in channels:
LOGGER.info(f'{channel.category.name} #{channel.name}')
if 'after' not in kwargs:
kwargs['after'] = (datetime.today() - timedelta(days=days))