diff --git a/tbot.py b/tbot.py index 67f94fb..e4bc1fc 100644 --- a/tbot.py +++ b/tbot.py @@ -4,7 +4,7 @@ import re import json with open(".twitchcreds") as file: - botSettings = json.loads(file.read()) + botSettings = json.loads(file.read())# UserID = botSettings[0]['OAUTH'] PREFIX = '!' @@ -17,11 +17,14 @@ userstats = {} permitURL = [] +class UserData: + def __init__(self, username): + self.username = username + self.mod = username in botSettings[1]["MODS"] + def isURL(message): rule = re.compile("http(|s)[;:]\/\/.*\..*") - if rule.findall(message): - return True - return False + return rule.findall(message) def handle_message(message: twitch.chat.Message) -> None: @@ -80,7 +83,7 @@ def handle_message(message: twitch.chat.Message) -> None: else: pass - print(userstats) +# print(userstats) def main(): chat = twitch.Chat(channel='#aztecdude1', @@ -94,5 +97,5 @@ def main(): if __name__ == '__main__': main() - print(botSettings) - #print(isURL("https://google.com")) \ No newline at end of file + #print(isURL("https://google.com")) + print(test.mod) \ No newline at end of file