Compare commits
No commits in common. "d773d8b8da60b139236a50ba38a3797978f6bddc" and "97166feaf0a836e6e699f758ec307d41e282d423" have entirely different histories.
d773d8b8da
...
97166feaf0
12
README.md
12
README.md
@ -1,19 +1,15 @@
|
|||||||
A chatbot to help with live stream production/effects.
|
A chatbot to help with live stream production/effects.
|
||||||
|
|
||||||
___
|
|
||||||
|
|
||||||
# Credentials Setup:
|
# Credentials Setup:
|
||||||
|
|
||||||
Create a json based on the templates and put them into the credentials folder.
|
## For Twitch Credentials in twitch_cred.py
|
||||||
|
|
||||||
## For Twitch Credentials
|
|
||||||
Username = `TwitchUsername`
|
Username = `TwitchUsername`
|
||||||
|
|
||||||
Helix Client ID = `https://dev.twitch.tv/console/apps`
|
Helix ID = `https://dev.twitch.tv/console/apps`
|
||||||
|
|
||||||
Oauth = `https://twitchapps.com/tmi/`
|
Oauth = `https://twitchapps.com/tmi/`
|
||||||
|
|
||||||
V5 Client ID = `https://twitchtokengenerator.com/`
|
V5 Client ID = `https://twitchtokengenerator.com/`
|
||||||
|
|
||||||
## For Database Credentials
|
## For Database Credentials in db_cred.py
|
||||||
Engine = `"mysql+mysqlconnector://root:password@localhost:3306/DatabaseName"`
|
engine = `"mysql+mysqlconnector://root:password@localhost:3306/DatabaseName"`
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"engine": "mysql+mysqlconnector://root:password@localhost:3306/DatabaseName"
|
|
||||||
}
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"username": "something",
|
"username": "something",
|
||||||
"helix": "Helix Client ID",
|
"helix": "secret",
|
||||||
"oauth": "token",
|
"oauth": "token",
|
||||||
"v5_client": "Client ID"
|
"v5_client": "I have no idea here"
|
||||||
}
|
}
|
||||||
@ -61,18 +61,12 @@ class Credentials_Module():
|
|||||||
if file.lower().find("twitch") != -1:
|
if file.lower().find("twitch") != -1:
|
||||||
credential_loading_function = self.credentialLoadingFunctions.get(Credential.Twitch_Credential)
|
credential_loading_function = self.credentialLoadingFunctions.get(Credential.Twitch_Credential)
|
||||||
output = credential_loading_function(self, file)
|
output = credential_loading_function(self, file)
|
||||||
if output is not None:
|
|
||||||
self.Twitch_Credentials_List.append(output)
|
|
||||||
if file.lower().find("discord") != -1:
|
if file.lower().find("discord") != -1:
|
||||||
credential_loading_function = self.credentialLoadingFunctions.get(Credential.Discord_Credential)
|
credential_loading_function = self.credentialLoadingFunctions.get(Credential.Discord_Credential)
|
||||||
output = credential_loading_function(self, file)
|
output = credential_loading_function(self, file)
|
||||||
if output is not None:
|
|
||||||
self.Discord_Credentials_List.append(output)
|
|
||||||
if file.lower().find("db") != -1:
|
if file.lower().find("db") != -1:
|
||||||
credential_loading_function = self.credentialLoadingFunctions.get(Credential.DB_Credential)
|
credential_loading_function = self.credentialLoadingFunctions.get(Credential.DB_Credential)
|
||||||
output = credential_loading_function(self, file)
|
output = credential_loading_function(self, file)
|
||||||
if output is not None:
|
|
||||||
self.DB_Credentials_List.append(output)
|
|
||||||
|
|
||||||
def list_credential_files(self):
|
def list_credential_files(self):
|
||||||
credentialPath = self.get_credentials_dir()
|
credentialPath = self.get_credentials_dir()
|
||||||
@ -103,11 +97,7 @@ class Credentials_Module():
|
|||||||
return tobj
|
return tobj
|
||||||
|
|
||||||
def load_DB_Credential(self, fileName: str):
|
def load_DB_Credential(self, fileName: str):
|
||||||
file_path = os.path.join(self.get_credentials_dir(), fileName)
|
return None
|
||||||
f = open(file_path)
|
|
||||||
raw_json = json.loads(f.read())
|
|
||||||
tobj = DB_Credential(**raw_json)
|
|
||||||
return tobj
|
|
||||||
|
|
||||||
credentialLoadingFunctions = { # this is a mapping of the Credential enum to function pointers
|
credentialLoadingFunctions = { # this is a mapping of the Credential enum to function pointers
|
||||||
Credential.Twitch_Credential: load_Twitch_Credential,
|
Credential.Twitch_Credential: load_Twitch_Credential,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user