Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions dozer/cogs/news.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,16 @@ async def get_new_posts(self):
continue
if kind == 'embed':
for embed in posts[data]['embed']:
await channel.send(embed=embed)
try:
await channel.send(embed=embed)
except discord.HTTPException:
continue
elif kind == 'plain':
for post in posts[data]['plain']:
await channel.send(post)
try:
await channel.send(post)
except discord.HTTPException:
continue

next_run = self.get_new_posts.next_iteration
logger.debug(f"Done with getting news. Next run in "
Expand Down
2 changes: 1 addition & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ score=yes
[REFACTORING]

# Maximum number of nested blocks for function / method body
max-nested-blocks=5
max-nested-blocks=6

# Complete name of functions that never returns. When checking for
# inconsistent-return-statements if a never returning function is called then
Expand Down
Loading