Compare commits

..

No commits in common. "d773d8b8da60b139236a50ba38a3797978f6bddc" and "97166feaf0a836e6e699f758ec307d41e282d423" have entirely different histories.

4 changed files with 7 additions and 24 deletions

View File

@ -1,19 +1,15 @@
A chatbot to help with live stream production/effects.
___
# Credentials Setup:
Create a json based on the templates and put them into the credentials folder.
## For Twitch Credentials
## For Twitch Credentials in twitch_cred.py
Username = `TwitchUsername`
Helix Client ID = `https://dev.twitch.tv/console/apps`
Helix ID = `https://dev.twitch.tv/console/apps`
Oauth = `https://twitchapps.com/tmi/`
V5 Client ID = `https://twitchtokengenerator.com/`
## For Database Credentials
Engine = `"mysql+mysqlconnector://root:password@localhost:3306/DatabaseName"`
## For Database Credentials in db_cred.py
engine = `"mysql+mysqlconnector://root:password@localhost:3306/DatabaseName"`

View File

@ -1,3 +0,0 @@
{
"engine": "mysql+mysqlconnector://root:password@localhost:3306/DatabaseName"
}

View File

@ -1,6 +1,6 @@
{
"username": "something",
"helix": "Helix Client ID",
"helix": "secret",
"oauth": "token",
"v5_client": "Client ID"
"v5_client": "I have no idea here"
}

View File

@ -61,18 +61,12 @@ class Credentials_Module():
if file.lower().find("twitch") != -1:
credential_loading_function = self.credentialLoadingFunctions.get(Credential.Twitch_Credential)
output = credential_loading_function(self, file)
if output is not None:
self.Twitch_Credentials_List.append(output)
if file.lower().find("discord") != -1:
credential_loading_function = self.credentialLoadingFunctions.get(Credential.Discord_Credential)
output = credential_loading_function(self, file)
if output is not None:
self.Discord_Credentials_List.append(output)
if file.lower().find("db") != -1:
credential_loading_function = self.credentialLoadingFunctions.get(Credential.DB_Credential)
output = credential_loading_function(self, file)
if output is not None:
self.DB_Credentials_List.append(output)
def list_credential_files(self):
credentialPath = self.get_credentials_dir()
@ -103,11 +97,7 @@ class Credentials_Module():
return tobj
def load_DB_Credential(self, fileName: str):
file_path = os.path.join(self.get_credentials_dir(), fileName)
f = open(file_path)
raw_json = json.loads(f.read())
tobj = DB_Credential(**raw_json)
return tobj
return None
credentialLoadingFunctions = { # this is a mapping of the Credential enum to function pointers
Credential.Twitch_Credential: load_Twitch_Credential,