ruz-bot/entrypoint.py
Administrator b7ef588b34 initial
2022-10-21 13:43:59 +03:00

20 lines
373 B
Python

import sys
from daemons.bot import bot
from daemons.fetch import fetch
from daemons.notify import notify
arg = sys.argv[-1]
if arg == "bot":
print("bot is starting")
bot.polling()
elif arg == "fetch":
print("fetch is starting")
fetch()
elif arg == "notify":
print("notify is starting")
notify()
else:
raise ValueError(f"Unknown param {arg}")