-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathexample.py
More file actions
24 lines (19 loc) · 721 Bytes
/
example.py
File metadata and controls
24 lines (19 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os
from webex_bot.commands.echo import EchoCommand
from webex_bot.webex_bot import WebexBot
# (Optional) Proxy configuration
# Supports https or wss proxy, wss prioritized.
proxies = {
'https': 'http://proxy.esl.example.com:80',
'wss': 'socks5://proxy.esl.example.com:1080'
}
# Create a Bot Object
bot = WebexBot(teams_bot_token=os.getenv("WEBEX_ACCESS_TOKEN"),
approved_rooms=['06586d8d-6aad-4201-9a69-0bf9eeb5766e'],
bot_name="My Teams Ops Bot",
include_demo_commands=True,
proxies=proxies)
# Add new commands for the bot to listen out for.
bot.add_command(EchoCommand())
# Call `run` for the bot to wait for incoming messages.
bot.run()