aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMango0x45 <thomasvoss@live.com>2020-07-24 14:59:46 +0000
committerMango0x45 <thomasvoss@live.com>2020-07-24 14:59:46 +0000
commit039775211ffec65ea3e6bab74a933756c903958c (patch)
tree1fc834d08a643dec9a1b66a703fd1b514fadafa6
parent4b127c14cc6a95faefe9945efdee79b15bdfc2e1 (diff)
downloadsteve-bot-039775211ffec65ea3e6bab74a933756c903958c.tar
steve-bot-039775211ffec65ea3e6bab74a933756c903958c.tar.gz
steve-bot-039775211ffec65ea3e6bab74a933756c903958c.tar.bz2
steve-bot-039775211ffec65ea3e6bab74a933756c903958c.tar.lz
steve-bot-039775211ffec65ea3e6bab74a933756c903958c.tar.xz
steve-bot-039775211ffec65ea3e6bab74a933756c903958c.tar.zst
steve-bot-039775211ffec65ea3e6bab74a933756c903958c.zip
Creates video_blacklist.json if one doesn't exist
Diffstat (limited to '')
-rwxr-xr-xbot.py6
1 files changed, 6 insertions, 0 deletions
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):