-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
88 lines (74 loc) · 2.05 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
"""Copyright (c) Void 2024 - Discord Bot Codebase
This module is for loading up all necessary variables needed. The DISCORD_API_SECRET is hidden
behind an ".env" file to ensure that the token is not leaked. Any other important sensitive information
is saved inside of this ".env" file.
Author: Void (Lukas Kreuz)
Since: v1.0.0
"""
from logging.config import dictConfig
import os
from tkinter.constants import COMMAND
from discord import app_commands
from dotenv import load_dotenv
DEBUG = True # DEBUG MODE
LOCAL_PATH = "data/local"
CACHE_PATH = "data/local/cache"
load_dotenv()
DISCORD_TOKEN = os.getenv("DISCORD_TOKEN")
COMMAND_LIST = [
("client", False), # ("location", DEBUG)
("devtools", False),
("testing", True)
]
GAME_CHOICES = [
app_commands.Choice(name="Choice", value="choice")
]
MODE_CHOICES = [
app_commands.Choice(name="Choice", value="choice"),
]
GROUP_REPORT_CHOICES = [
app_commands.Choice(name="Other", value="Other")
]
LOGGING_CONFIG = {
"version": 1,
"disabled_existing_loggers": False,
"formatters": {
"verbose": {
"format": "%(levelname)-10s - %(asctime)s - %(module)-15s : %(message)s"
},
"standard": {
"format": "%(levelname)-10s - %(name)-15s : %(message)s"
}
},
"handlers": {
"console": {
"level": "DEBUG",
"class": "logging.StreamHandler",
"formatter": "standard"
},
"console2": {
"level": "WARNING",
"class": "logging.StreamHandler",
"formatter": "standard"
},
"file": {
"level": "INFO",
"class": "logging.FileHandler",
"filename": "data/logs/infos.log",
"mode": "w",
}
},
"loggers": {
"bot": {
"handlers": ["console"],
"level": "INFO",
"propagate": False,
},
"discord": {
"handlers": ["console2", "file"],
"level": "INFO",
"propagate": False,
}
}
}
dictConfig(LOGGING_CONFIG)