Update ENV class

- Add CLIENT_ID property
This commit is contained in:
trueold89 2024-06-03 19:01:44 +03:00
parent e6c44193f8
commit b07af72901
Signed by: trueold89
GPG Key ID: C122E85DD49E6B30
1 changed files with 13 additions and 0 deletions

View File

@ -46,3 +46,16 @@ class ENV(object):
if env is None:
env = 9
return env
@property
def CLIENT_ID(self) -> str:
"""
Gets the Discord Client ID from the system environment
:return: Discord Client ID
"""
env = environ.get("CLIENT_ID")
if env is None:
raise ValueError("client id is not set\nTry to install the system ENV CLIENT_ID\n(export "
"CLIENT_ID=insertyourclientidhere)")
return env