This commit is contained in:
Luke Tainton (ltainton)
2023-04-05 20:57:31 +01:00
parent be6546e4cc
commit 102b74e90a
21 changed files with 409 additions and 13 deletions

View File

@ -1,8 +1,32 @@
#!/usr/local/bin/python3
#!/usr/bin/env python3
from webex_bot.webex_bot import WebexBot
from app.commands.exit import ExitCommand
from app.commands.submit_task import SubmitTaskCommand
from app.utils.config import config
def create_bot() -> WebexBot:
# Create a Bot Object
webex_bot: WebexBot = WebexBot(
bot_name=config.bot_name,
teams_bot_token=config.webex_token,
approved_domains=["cisco.com"],
)
webex_bot.commands.clear()
webex_bot.add_command(SubmitTaskCommand())
webex_bot.add_command(ExitCommand())
webex_bot.help_command = SubmitTaskCommand()
webex_bot.help_command.delete_previous_message = True
return webex_bot
def main():
# Commands here
if __name__ == "__main__":
main()
try:
bot: WebexBot = create_bot()
bot.run()
except KeyboardInterrupt:
print("Shutting down bot...")
exit()