proper path constants, logging level constant, file & stream logging

This commit is contained in:
Xevion
2021-01-24 14:22:09 -06:00
parent bc1a6c5d7e
commit bf09c13d6c
6 changed files with 34 additions and 7 deletions

View File

@@ -1,3 +1,16 @@
import logging
import os
from collections import namedtuple
# Path Constants
BASE_DIR = os.path.dirname(os.path.abspath(os.path.join(__file__, '..')))
STATIC_DIR = os.path.join(BASE_DIR, 'bot', 'static')
TOKEN = os.path.join(BASE_DIR, 'token.dat')
DATABASE = os.path.join(BASE_DIR, 'database.db')
# Other constants
LOGGING_LEVEL = logging.DEBUG
# NamedTuple Classes
PlayOptions = namedtuple('PlayOptions', ['hit', 'stand', 'double', 'split'])