forked from gptrk0/PYHABOT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
23 lines (16 loc) · 647 Bytes
/
run.py
File metadata and controls
23 lines (16 loc) · 647 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import dotenv
config = dotenv.dotenv_values(".env")
def main():
if config["TOKEN"] == "False":
print(f"Missing bot token.")
return
if config["INTEGRATION"] == "discord":
import classes.integrations.discord as DiscordIntegration
DiscordIntegration.init(config["TOKEN"])
elif config["INTEGRATION"] == "telegram":
import classes.integrations.telegram as TelegramIntegration
TelegramIntegration.init(config["TOKEN"])
else:
print("Expected valid Integration-type at command line argument 1, got " + str(config["INTEGRATION"]))
if __name__ == "__main__":
main()