[Streams] Remove stream alert if stream not found (#4939)

* Remove stream if not found

* Address Jack's review.
This commit is contained in:
PredaaA 2021-04-05 22:13:00 +02:00 committed by GitHub
parent 9a7c178db5
commit 3c742e39d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -778,6 +778,9 @@ class Streams(commands.Cog):
stream.messages.clear() stream.messages.clear()
await self.save_streams() await self.save_streams()
except StreamNotFound:
to_remove.append(stream)
continue
else: else:
if stream.messages: if stream.messages:
continue continue