aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-06-12 14:04:52 +0100
committerGravatar Gareth Coles <[email protected]>2018-06-12 14:04:52 +0100
commitf45d5e2748e38196acfe7cf57382cff0e79724df (patch)
tree167369be6c26ce03bc1da3dfdf6ddba52170e338
parentLinting (diff)
[Jams] Mention user in #code-jam-logs on approval
-rw-r--r--pysite/views/staff/jams/actions.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/pysite/views/staff/jams/actions.py b/pysite/views/staff/jams/actions.py
index 88a64c3d..49cd6306 100644
--- a/pysite/views/staff/jams/actions.py
+++ b/pysite/views/staff/jams/actions.py
@@ -1,7 +1,7 @@
from flask import jsonify, request
from pysite.base_route import APIView
-from pysite.constants import ALL_STAFF_ROLES, BotEventTypes, ErrorCodes, JAMMERS_ROLE
+from pysite.constants import ALL_STAFF_ROLES, BotEventTypes, ErrorCodes, JAMMERS_ROLE, CHANNEL_JAM_LOGS
from pysite.decorators import csrf, require_roles
from pysite.mixins import DBMixin, RMQMixin
@@ -230,6 +230,15 @@ class ActionView(APIView, DBMixin, RMQMixin):
}
)
+ self.rmq_bot_event(
+ BotEventTypes.send_message,
+ {
+ "message": f"Congratulations <@{snowflake}> - you've been approved, "
+ f"and we've assigned you the Jammer role!",
+ "target": CHANNEL_JAM_LOGS,
+ }
+ )
+
return jsonify({"result": "success"})
if action == "unapprove_application":