Skip to content

Commit

Permalink
Fix user check in on_ready
Browse files Browse the repository at this point in the history
  • Loading branch information
0x16c3 committed Sep 8, 2021
1 parent 2fb25f4 commit 25f5f28
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cogs/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,14 @@ async def on_ready(self):
user: Activity = await Activity.create(
item["username"], channel, int(item["type"])
)

if not user:
logger.debug(
f"Could not load <{item['username']}:{item['channel']}:{item['type']}>"
)
await database.feed_remove([item])
continue

self.feeds.append(user)

for user in self.feeds:
Expand Down

0 comments on commit 25f5f28

Please sign in to comment.