From 039775211ffec65ea3e6bab74a933756c903958c Mon Sep 17 00:00:00 2001 From: Mango0x45 Date: Fri, 24 Jul 2020 16:59:46 +0200 Subject: Creates video_blacklist.json if one doesn't exist --- bot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bot.py b/bot.py index 387c9f8..30d8b1f 100755 --- a/bot.py +++ b/bot.py @@ -60,6 +60,12 @@ class BedrockBot(commands.Bot): except json.decoder.JSONDecodeError: self.blacklist = [] + with open('video_blacklist.json', 'r') as f: + try: + self.video_blacklist = json.load(f) + except json.decoder.JSONDecodeError: + self.video_blacklist = [] + self.logger.warning(f'Online: {self.user} (ID: {self.user.id})') async def on_message(self, message): -- cgit v1.2.3