Skip to content

Commit b6a62c4

Browse files
committed
Add testing warning /mentor form
1 parent 9a8112a commit b6a62c4

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

pybot/endpoints/slack/actions/mentor_request.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ async def mentor_request_submit(action: Action, app: SirBot):
3535
# await request.submission_error(airtable_response, slack)
3636
# else:
3737
# await request.submission_complete(slack)
38+
await request.submission_complete(slack)
3839

3940

4041
async def cancel_mentor_request(action: Action, app: SirBot):

pybot/endpoints/slack/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def create_endpoints(plugin: SlackPlugin):
3434
plugin.on_command("/report", slash_report, wait=False)
3535
plugin.on_command("/ticket", slash_ticket, wait=False)
3636
plugin.on_command("/roll", slash_roll, wait=False)
37-
plugin.on_command('/mentor', slash_mentor, wait=False)
37+
plugin.on_command("/mentor", slash_mentor, wait=False)
3838

3939

4040
@catch_command_slack_error
@@ -106,7 +106,7 @@ async def slash_here(command: Command, app: SirBot):
106106

107107
logger.debug(f"/here params: {params}, /here headers {headers}")
108108
async with app.http_session.get(
109-
f"http://{PYBACK_HOST}:{PYBACK_PORT}/api/mods/", params=params, headers=headers
109+
f"http://{PYBACK_HOST}:{PYBACK_PORT}/api/mods/", params=params, headers=headers
110110
) as r:
111111

112112
logger.debug(f"pyback response status: {r.status}")

pybot/endpoints/slack/message_templates/commands.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def mentor_request_attachments(services, mentors, skillsets):
103103
},
104104
{
105105
"callback_id": "mentor_request_submit",
106+
"pretext": ":warning: This is only a test. Please use the current request form :warning:",
106107
"fallback": "Mentor Request",
107108
"actions": [
108109
{

pybot/endpoints/slack/message_templates/mentor_request.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ def submission_error(self, airtable_response, slack: SlackAPI):
154154

155155
def submission_complete(self, slack: SlackAPI):
156156
done_attachment = self.attachments[AttachmentIndex.SUBMIT]
157-
done_attachment["text"] = "Request submitted successfully!"
157+
# done_attachment["text"] = "Request submitted successfully!"
158+
159+
done_attachment["text"] = "Request submitted successfully! (not really)"
158160
done_attachment["actions"] = [
159161
{"type": "button", "text": "Dismiss", "name": "cancel", "value": "cancel"}
160162
]

0 commit comments

Comments
 (0)