31 lines
661 B
Python
31 lines
661 B
Python
#!/usr/local/bin/python3
|
|
|
|
from webex_bot.webex_bot import WebexBot
|
|
|
|
from app import close, meme
|
|
from app.config import config
|
|
|
|
|
|
def create_bot() -> WebexBot:
|
|
"""Create a Bot object."""
|
|
bot = WebexBot(
|
|
teams_bot_token=config.webex_token,
|
|
approved_domains=["cisco.com"],
|
|
bot_name="MemeBot",
|
|
include_demo_commands=False,
|
|
)
|
|
return bot
|
|
|
|
|
|
def main() -> None:
|
|
bot: WebexBot = create_bot()
|
|
bot.add_command(meme.MakeMemeCommand())
|
|
bot.add_command(close.ExitCommand())
|
|
bot.commands.remove(bot.help_command)
|
|
bot.help_command = meme.MakeMemeCommand()
|
|
bot.run()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|