From c6113e31eb75c4e28cc7de1485244b71880ef430 Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Tue, 20 Jul 2021 17:28:38 +0100 Subject: [PATCH] Added categories lookup file --- app/bot.py | 6 ++++++ app/data/categories.yml | 1 + 2 files changed, 7 insertions(+) create mode 100644 app/data/categories.yml diff --git a/app/bot.py b/app/bot.py index fa8721a..bffaabc 100644 --- a/app/bot.py +++ b/app/bot.py @@ -48,6 +48,12 @@ gmFile = os.getenv('GM') if os.getenv('GM').endswith('.yml') or os.getenv('GM'). if not os.path.exists(gmFile): yaml_dump({},gmFile) +# Locate or create Categories lookup file. Same as above. +categoriesFile = os.getenv('CATEGORIES') if os.getenv('CATEGORIES').endswith('.yml') or os.getenv('CATEGORIES').endswith('.yaml') else './data/categories.yml' + +if not os.path.exists(categoriesFile): + yaml_dump({},categoriesFile) + # Locate Cogs Directory cogsDir = 'cogs' diff --git a/app/data/categories.yml b/app/data/categories.yml new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/app/data/categories.yml @@ -0,0 +1 @@ +{}