File tree Expand file tree Collapse file tree 3 files changed +15
-15
lines changed
Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 11# --------------------------- #
22# ## pybot.env ###
33
4- # TOKEN=
5- # BOT_OATH_TOKEN=
6- # SLACK_BOT_SIGNING_SECRET=
7- # VERIFICATION_TOKEN=
8- # SLACK_BOT_ID=
9- # SLACK_BOT_USER_ID=
4+ # BOT_OAUTH_TOKEN=<Bot User OAuth Access Token>
5+ # SLACK_BOT_SIGNING_SECRET=<Client Secret>
6+ # VERIFICATION_TOKEN=<Verification Token>
7+ # SLACK_BOT_ID=<Not necessary in many cases, see the below warning>
108
11- # PYBACK_PORT=
12- # PYBACK_HOST=
9+ # #~~ "`SLACK_BOT_USER_ID` not set. It is required for `on mention` routing and discarding "
10+ # #~~ "message coming from Sir Bot-a-lot to avoid loops."
1311
12+
13+ # ~~ These are only needed if you want to override the default channel names ~~#
1414# COMMUNITY_CHANNEL=
1515# MENTOR_CHANNEL=
1616# TICKET_CHANNEL=
1717
1818# AIRTABLE_API_KEY=
1919# AIRTABLE_BASE_KEY=
2020
21- # PYBACK_TOKEN=
2221
2322# --------------------------- #
2423# ## ngrok.env ###
Original file line number Diff line number Diff line change 4242 bot .load_plugin (slack )
4343
4444 admin_configs = dict (** slack_configs )
45- admin_configs ["token" ] = os .environ .get ("APP_ADMIN_OAUTH_TOKEN" )
45+ admin_token = os .environ .get ("APP_ADMIN_OAUTH_TOKEN" )
46+ if admin_token :
47+ admin_configs ["token" ] = admin_token
4648 admin_slack = SlackPlugin (** admin_configs )
4749 bot .load_plugin (admin_slack , name = "admin_slack" )
4850
Original file line number Diff line number Diff line change 44COMMUNITY_CHANNEL = os .environ .get ("COMMUNITY_CHANNEL" ) or "greetings"
55MODERATOR_CHANNEL = os .environ .get ("MODERATOR_CHANNEL" ) or "moderators"
66TICKET_CHANNEL = os .environ .get ("TICKET_CHANNEL" ) or "oc-project-leads"
7- APP_TOKEN = os .environ .get ("APP_TOKEN" ) or "123"
87YELP_TOKEN = os .environ .get ("YELP_TOKEN" ) or "token"
9- PYBACK_HOST = os .environ .get ("PYBACK_HOST" ) or "pyback"
10- PYBACK_PORT = os .environ .get ("PYBACK_PORT" ) or 8000
11- PYBACK_TOKEN = os .environ .get ("PYBACK_TOKEN" ) or "token"
128PORT = os .environ .get ("SIRBOT_PORT" , 5000 )
139HOST = os .environ .get ("SIRBOT_ADDR" , "0.0.0.0" )
1410PYBOT_ENV = os .environ .get ("PYBOT_ENV" , "dev" )
1915BOT_URL = "https://github.com/OperationCode/operationcode-pybot"
2016
2117slack_configs = {
22- "token" : os .environ .get ("BOT_OATH_TOKEN" ),
18+ "token" : os .environ .get (
19+ "BOT_OAUTH_TOKEN" ,
20+ os .environ .get ('BOT_OATH_TOKEN' ) # fallback using old typo value
21+ ),
2322 "signing_secret" : os .environ .get ("SLACK_BOT_SIGNING_SECRET" ),
2423 "verify" : os .environ .get ("VERIFICATION_TOKEN" ),
2524 "bot_id" : os .environ .get ("SLACK_BOT_ID" ),
You can’t perform that action at this time.
0 commit comments